Merge pull request #108 from SibrenVasse/spotify

fix(custom): fix conditional statement
pull/110/head
Alex 2018-11-26 20:09:21 +01:00 committed by GitHub
commit c051b517ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ def on_play(player, status, manager):
def on_metadata(player, metadata, manager): def on_metadata(player, metadata, manager):
track_info = '' track_info = ''
if player.props.player_name == 'spotify' \ if player.props.player_name == 'spotify' and \
'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'