mediaplayer: do not show artist tag if not present

This commit is contained in:
dalahast 2020-09-08 18:22:41 +02:00
parent 4ab5d0a4aa
commit d4db40e2e8
Signed by: dalahast
GPG Key ID: 504A02165E7FA6B2

@ -35,6 +35,8 @@ def on_metadata(player, metadata, manager):
'mpris:trackid' in metadata.keys() and \ 'mpris:trackid' in metadata.keys() and \
':ad:' in player.props.metadata['mpris:trackid']: ':ad:' in player.props.metadata['mpris:trackid']:
track_info = 'AD PLAYING' 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() != '': elif player.get_artist() != '' and player.get_title() != '':
track_info = '{artist} - {title}'.format(artist=player.get_artist(), track_info = '{artist} - {title}'.format(artist=player.get_artist(),
title=player.get_title()) title=player.get_title())