Merge pull request #740 from Mosibi/mpd_show_name_and_title
Added support for MPD to display the name before the title if it is availablepull/717/merge
commit
7e9eaf14b8
|
@ -141,7 +141,13 @@ class MpdDevice(MediaPlayerDevice):
|
|||
@property
|
||||
def media_title(self):
|
||||
""" Title of current playing media. """
|
||||
return self.currentsong['title']
|
||||
name = self.currentsong.get('name', None)
|
||||
title = self.currentsong['title']
|
||||
|
||||
if name is None:
|
||||
return title
|
||||
else:
|
||||
return '{}: {}'.format(name, title)
|
||||
|
||||
@property
|
||||
def media_artist(self):
|
||||
|
|
Loading…
Reference in New Issue