mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
small bugfix (#2532)
This commit is contained in:
parent
95d033f1af
commit
1877906fdf
@ -266,6 +266,10 @@ class SonosDevice(MediaPlayerDevice):
|
|||||||
@property
|
@property
|
||||||
def media_title(self):
|
def media_title(self):
|
||||||
"""Title of current playing media."""
|
"""Title of current playing media."""
|
||||||
|
if self._player.is_playing_line_in:
|
||||||
|
return SUPPORT_SOURCE_LINEIN
|
||||||
|
if self._player.is_playing_tv:
|
||||||
|
return SUPPORT_SOURCE_TV
|
||||||
if 'artist' in self._trackinfo and 'title' in self._trackinfo:
|
if 'artist' in self._trackinfo and 'title' in self._trackinfo:
|
||||||
return '{artist} - {title}'.format(
|
return '{artist} - {title}'.format(
|
||||||
artist=self._trackinfo['artist'],
|
artist=self._trackinfo['artist'],
|
||||||
@ -273,10 +277,6 @@ class SonosDevice(MediaPlayerDevice):
|
|||||||
)
|
)
|
||||||
if 'title' in self._status:
|
if 'title' in self._status:
|
||||||
return self._trackinfo['title']
|
return self._trackinfo['title']
|
||||||
if self._player.is_playing_line_in:
|
|
||||||
return SUPPORT_SOURCE_LINEIN
|
|
||||||
if self._player.is_playing_tv:
|
|
||||||
return SUPPORT_SOURCE_TV
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_media_commands(self):
|
def supported_media_commands(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user