mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Returning None when name and title are both not available
Removed trailing whitespaces
This commit is contained in:
parent
56a2ffca1d
commit
429904c437
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user