Upgrade Openhome library (#7671)
* Added support for openhome devices using transport service * Style cleanuppull/7673/head
parent
f637a07016
commit
adde9e6231
|
@ -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.2.1']
|
||||
REQUIREMENTS = ['openhomedevice==0.4.0']
|
||||
|
||||
SUPPORT_OPENHOME = SUPPORT_SELECT_SOURCE | \
|
||||
SUPPORT_VOLUME_STEP | SUPPORT_VOLUME_MUTE | SUPPORT_VOLUME_SET | \
|
||||
|
@ -92,7 +92,7 @@ class OpenhomeDevice(MediaPlayerDevice):
|
|||
|
||||
if self._source["type"] == "Radio":
|
||||
self._supported_features |= SUPPORT_STOP | SUPPORT_PLAY
|
||||
if self._source["type"] == "Playlist":
|
||||
if self._source["type"] in ("Playlist", "Cloud"):
|
||||
self._supported_features |= SUPPORT_PREVIOUS_TRACK | \
|
||||
SUPPORT_NEXT_TRACK | SUPPORT_PAUSE | SUPPORT_PLAY
|
||||
|
||||
|
@ -173,17 +173,17 @@ class OpenhomeDevice(MediaPlayerDevice):
|
|||
@property
|
||||
def media_image_url(self):
|
||||
"""Image url of current playing media."""
|
||||
return self._track_information["albumArt"]
|
||||
return self._track_information["albumArtwork"]
|
||||
|
||||
@property
|
||||
def media_artist(self):
|
||||
"""Artist of current playing media, music track only."""
|
||||
return self._track_information["artist"]
|
||||
return self._track_information["artist"][0]
|
||||
|
||||
@property
|
||||
def media_album_name(self):
|
||||
"""Album name of current playing media, music track only."""
|
||||
return self._track_information["album"]
|
||||
return self._track_information["albumTitle"]
|
||||
|
||||
@property
|
||||
def media_title(self):
|
||||
|
|
|
@ -406,7 +406,7 @@ onkyo-eiscp==1.1
|
|||
openevsewifi==0.4
|
||||
|
||||
# homeassistant.components.media_player.openhome
|
||||
openhomedevice==0.2.1
|
||||
openhomedevice==0.4.0
|
||||
|
||||
# homeassistant.components.switch.orvibo
|
||||
orvibo==1.1.1
|
||||
|
|
Loading…
Reference in New Issue