mirror of
https://github.com/home-assistant/core.git
synced 2026-09-10 07:31:41 +01:00
Add media_content_id to media player in Xbox integration (#156519)
This commit is contained in:
@@ -99,6 +99,11 @@ class XboxMediaPlayer(XboxConsoleBaseEntity, MediaPlayerEntity):
|
||||
return MediaType.GAME
|
||||
return MediaType.APP
|
||||
|
||||
@property
|
||||
def media_content_id(self) -> str | None:
|
||||
"""Content ID of current playing media."""
|
||||
return self.data.app_details.product_id if self.data.app_details else None
|
||||
|
||||
@property
|
||||
def media_title(self) -> str | None:
|
||||
"""Title of current playing media."""
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
'entity_picture': 'http://store-images.s-microsoft.com/image/apps.9815.9007199266246365.7dc5d343-fe4a-40c3-93dd-c78e77f97331.45eebdef-f725-4799-bbf8-9ad8391a8279',
|
||||
'entity_picture_local': '/api/media_player_proxy/media_player.xone?token=mock_token&cache=739260d7bff66329',
|
||||
'friendly_name': 'XONE',
|
||||
'media_content_id': '9WZDNCRFJ3TJ',
|
||||
'media_content_type': <MediaType.APP: 'app'>,
|
||||
'media_title': 'Netflix',
|
||||
'supported_features': <MediaPlayerEntityFeature: 149385>,
|
||||
@@ -95,6 +96,7 @@
|
||||
'entity_picture': 'http://store-images.s-microsoft.com/image/apps.9815.9007199266246365.7dc5d343-fe4a-40c3-93dd-c78e77f97331.45eebdef-f725-4799-bbf8-9ad8391a8279',
|
||||
'entity_picture_local': '/api/media_player_proxy/media_player.xonex?token=mock_token&cache=739260d7bff66329',
|
||||
'friendly_name': 'XONEX',
|
||||
'media_content_id': '9WZDNCRFJ3TJ',
|
||||
'media_content_type': <MediaType.APP: 'app'>,
|
||||
'media_title': 'Netflix',
|
||||
'supported_features': <MediaPlayerEntityFeature: 149385>,
|
||||
|
||||
Reference in New Issue
Block a user