From d4db40e2e8f1fdd5607b45118c2f5a531a573d28 Mon Sep 17 00:00:00 2001 From: dalahast Date: Tue, 8 Sep 2020 18:22:41 +0200 Subject: [PATCH] mediaplayer: do not show artist tag if not present --- .local/bin/mediaplayer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.local/bin/mediaplayer.py b/.local/bin/mediaplayer.py index 83604a3..2a3c89c 100755 --- a/.local/bin/mediaplayer.py +++ b/.local/bin/mediaplayer.py @@ -35,6 +35,8 @@ def on_metadata(player, metadata, manager): 'mpris:trackid' in metadata.keys() and \ ':ad:' in player.props.metadata['mpris:trackid']: track_info = 'AD PLAYING' + elif player.get_artist() == None and player.get_title() != '': + track_info = player.get_title() elif player.get_artist() != '' and player.get_title() != '': track_info = '{artist} - {title}'.format(artist=player.get_artist(), title=player.get_title())