From db1136d647318624cc6d1d94a8572ef51ab06e82 Mon Sep 17 00:00:00 2001 From: Adrien Lemaire Date: Wed, 1 Jan 2020 13:50:29 +0900 Subject: [PATCH] feat: show title if artist isn't available --- resources/custom_modules/mediaplayer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/custom_modules/mediaplayer.py b/resources/custom_modules/mediaplayer.py index 4d75a254..7404f48f 100755 --- a/resources/custom_modules/mediaplayer.py +++ b/resources/custom_modules/mediaplayer.py @@ -38,6 +38,8 @@ def on_metadata(player, metadata, manager): elif player.get_artist() != '' and player.get_title() != '': track_info = '{artist} - {title}'.format(artist=player.get_artist(), title=player.get_title()) + else: + track_info = player.get_title() if player.props.status != 'Playing' and track_info: track_info = ' ' + track_info @@ -123,4 +125,3 @@ def main(): if __name__ == '__main__': main() -