Add media_type_app to media_player (#23666)
* Add media_type_app * Add MEDIA_TYPE_APP * Bump 0.7.3 * Bump 0.7.3 * Bump 0.7.3 * typopull/23714/head
parent
3dd1d3c418
commit
3e59e7f347
|
@ -39,6 +39,7 @@ MEDIA_TYPE_PLAYLIST = 'playlist'
|
|||
MEDIA_TYPE_IMAGE = 'image'
|
||||
MEDIA_TYPE_URL = 'url'
|
||||
MEDIA_TYPE_GAME = 'game'
|
||||
MEDIA_TYPE_APP = 'app'
|
||||
|
||||
SERVICE_CLEAR_PLAYLIST = 'clear_playlist'
|
||||
SERVICE_PLAY_MEDIA = 'play_media'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Ps4",
|
||||
"documentation": "https://www.home-assistant.io/components/ps4",
|
||||
"requirements": [
|
||||
"pyps4-homeassistant==0.7.2"
|
||||
"pyps4-homeassistant==0.7.3"
|
||||
],
|
||||
"dependencies": [],
|
||||
"codeowners": [
|
||||
|
|
|
@ -7,8 +7,8 @@ import voluptuous as vol
|
|||
from homeassistant.components.media_player import (
|
||||
ENTITY_IMAGE_URL, MediaPlayerDevice)
|
||||
from homeassistant.components.media_player.const import (
|
||||
MEDIA_TYPE_GAME, SUPPORT_SELECT_SOURCE, SUPPORT_STOP, SUPPORT_TURN_OFF,
|
||||
SUPPORT_TURN_ON)
|
||||
MEDIA_TYPE_GAME, MEDIA_TYPE_APP, SUPPORT_SELECT_SOURCE,
|
||||
SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON)
|
||||
from homeassistant.components.ps4 import format_unique_id
|
||||
from homeassistant.const import (
|
||||
ATTR_COMMAND, ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_REGION,
|
||||
|
@ -222,7 +222,10 @@ class PS4Device(MediaPlayerDevice):
|
|||
self._media_title = app_name or name
|
||||
self._source = self._media_title
|
||||
self._media_image = art
|
||||
self._media_type = MEDIA_TYPE_GAME
|
||||
if title.game_type == 'App':
|
||||
self._media_type = MEDIA_TYPE_APP
|
||||
else:
|
||||
self._media_type = MEDIA_TYPE_GAME
|
||||
self.update_list()
|
||||
|
||||
def update_list(self):
|
||||
|
|
|
@ -1249,7 +1249,7 @@ pypjlink2==1.2.0
|
|||
pypoint==1.1.1
|
||||
|
||||
# homeassistant.components.ps4
|
||||
pyps4-homeassistant==0.7.2
|
||||
pyps4-homeassistant==0.7.3
|
||||
|
||||
# homeassistant.components.qwikswitch
|
||||
pyqwikswitch==0.93
|
||||
|
|
|
@ -252,7 +252,7 @@ pyopenuv==1.0.9
|
|||
pyotp==2.2.7
|
||||
|
||||
# homeassistant.components.ps4
|
||||
pyps4-homeassistant==0.7.2
|
||||
pyps4-homeassistant==0.7.3
|
||||
|
||||
# homeassistant.components.qwikswitch
|
||||
pyqwikswitch==0.93
|
||||
|
|
Loading…
Reference in New Issue