Fixed metadata issue (#7932)
parent
c52b18d7c8
commit
e4d100d54d
|
@ -14,7 +14,7 @@ from homeassistant.components.media_player import (
|
|||
from homeassistant.const import (
|
||||
STATE_IDLE, STATE_PAUSED, STATE_PLAYING, STATE_OFF)
|
||||
|
||||
REQUIREMENTS = ['openhomedevice==0.4.0']
|
||||
REQUIREMENTS = ['openhomedevice==0.4.2']
|
||||
|
||||
SUPPORT_OPENHOME = SUPPORT_SELECT_SOURCE | \
|
||||
SUPPORT_VOLUME_STEP | SUPPORT_VOLUME_MUTE | SUPPORT_VOLUME_SET | \
|
||||
|
@ -60,7 +60,6 @@ class OpenhomeDevice(MediaPlayerDevice):
|
|||
self._track_information = {}
|
||||
self._in_standby = None
|
||||
self._transport_state = None
|
||||
self._track_information = None
|
||||
self._volume_level = None
|
||||
self._volume_muted = None
|
||||
self._supported_features = SUPPORT_OPENHOME
|
||||
|
@ -173,27 +172,29 @@ class OpenhomeDevice(MediaPlayerDevice):
|
|||
@property
|
||||
def media_image_url(self):
|
||||
"""Image url of current playing media."""
|
||||
return self._track_information["albumArtwork"]
|
||||
return self._track_information.get('albumArtwork')
|
||||
|
||||
@property
|
||||
def media_artist(self):
|
||||
"""Artist of current playing media, music track only."""
|
||||
return self._track_information["artist"][0]
|
||||
artists = self._track_information.get('artist')
|
||||
if artists:
|
||||
return artists[0]
|
||||
|
||||
@property
|
||||
def media_album_name(self):
|
||||
"""Album name of current playing media, music track only."""
|
||||
return self._track_information["albumTitle"]
|
||||
return self._track_information.get('albumTitle')
|
||||
|
||||
@property
|
||||
def media_title(self):
|
||||
"""Title of current playing media."""
|
||||
return self._track_information["title"]
|
||||
return self._track_information.get('title')
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
"""Name of the current input source."""
|
||||
return self._source["name"]
|
||||
return self._source.get('name')
|
||||
|
||||
@property
|
||||
def volume_level(self):
|
||||
|
|
|
@ -403,7 +403,7 @@ onkyo-eiscp==1.1
|
|||
openevsewifi==0.4
|
||||
|
||||
# homeassistant.components.media_player.openhome
|
||||
openhomedevice==0.4.0
|
||||
openhomedevice==0.4.2
|
||||
|
||||
# homeassistant.components.switch.orvibo
|
||||
orvibo==1.1.1
|
||||
|
|
Loading…
Reference in New Issue