Returning None when name and title are both not available

Removed trailing whitespaces
This commit is contained in:
Richard Arends 2015-12-30 13:00:34 +01:00
parent 56a2ffca1d
commit 429904c437

View File

@ -145,11 +145,11 @@ class MpdDevice(MediaPlayerDevice):
title = self.currentsong.get('title', None) title = self.currentsong.get('title', None)
if name is None and title is None: if name is None and title is None:
return "No information received from MPD" return "None"
elif name is None: elif name is None:
return title return title
elif title is None: elif title is None:
return name return name
else: else:
return '{}: {}'.format(name, title) return '{}: {}'.format(name, title)