mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix media source for Xbox integration (#41959)
* fix media content type * fix comments
This commit is contained in:
parent
ca9ac48938
commit
d5bf27427c
@ -1,4 +1,4 @@
|
||||
"""Netatmo Media Source Implementation."""
|
||||
"""Xbox Media Source Implementation."""
|
||||
from dataclasses import dataclass
|
||||
import logging
|
||||
from typing import List, Tuple
|
||||
@ -78,7 +78,7 @@ class XboxSource(MediaSource):
|
||||
name: str = "Xbox Game Media"
|
||||
|
||||
def __init__(self, hass: HomeAssistantType, client: XboxLiveClient):
|
||||
"""Initialize Netatmo source."""
|
||||
"""Initialize Xbox source."""
|
||||
super().__init__(DOMAIN)
|
||||
|
||||
self.hass: HomeAssistantType = hass
|
||||
@ -127,7 +127,7 @@ class XboxSource(MediaSource):
|
||||
domain=DOMAIN,
|
||||
identifier="",
|
||||
media_class=MEDIA_CLASS_DIRECTORY,
|
||||
media_content_type=None,
|
||||
media_content_type="",
|
||||
title="Xbox Game Media",
|
||||
can_play=False,
|
||||
can_expand=True,
|
||||
@ -200,7 +200,7 @@ class XboxSource(MediaSource):
|
||||
domain=DOMAIN,
|
||||
identifier=f"{title}~~{category}",
|
||||
media_class=MEDIA_CLASS_DIRECTORY,
|
||||
media_content_type=None,
|
||||
media_content_type="",
|
||||
title=f"{owner.title()} {kind.title()}",
|
||||
can_play=False,
|
||||
can_expand=True,
|
||||
@ -223,7 +223,7 @@ def _build_game_item(item: InstalledPackage, images: List[Image]):
|
||||
domain=DOMAIN,
|
||||
identifier=f"{item.title_id}#{item.name}#{thumbnail}",
|
||||
media_class=MEDIA_CLASS_GAME,
|
||||
media_content_type=None,
|
||||
media_content_type="",
|
||||
title=item.name,
|
||||
can_play=False,
|
||||
can_expand=True,
|
||||
@ -239,7 +239,7 @@ def _build_categories(title):
|
||||
domain=DOMAIN,
|
||||
identifier=f"{title}",
|
||||
media_class=MEDIA_CLASS_GAME,
|
||||
media_content_type=None,
|
||||
media_content_type="",
|
||||
title=name,
|
||||
can_play=False,
|
||||
can_expand=True,
|
||||
@ -257,7 +257,7 @@ def _build_categories(title):
|
||||
domain=DOMAIN,
|
||||
identifier=f"{title}~~{owner}#{kind}",
|
||||
media_class=MEDIA_CLASS_DIRECTORY,
|
||||
media_content_type=None,
|
||||
media_content_type="",
|
||||
title=f"{owner.title()} {kind.title()}",
|
||||
can_play=False,
|
||||
can_expand=True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user