mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +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)
|
||||
|
||||
if name is None and title is None:
|
||||
return "No information received from MPD"
|
||||
return "None"
|
||||
elif name is None:
|
||||
return title
|
||||
elif title is None:
|
||||
return name
|
||||
return name
|
||||
else:
|
||||
return '{}: {}'.format(name, title)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user