Skip to content

Commit

Permalink
Fix media source for Xbox integration (home-assistant#41959)
Browse files Browse the repository at this point in the history
* fix media content type

* fix comments
  • Loading branch information
hunterjm authored Oct 16, 2020
1 parent ca9ac48 commit d5bf274
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions homeassistant/components/xbox/media_source.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Netatmo Media Source Implementation."""
"""Xbox Media Source Implementation."""
from dataclasses import dataclass
import logging
from typing import List, Tuple
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -127,7 +127,7 @@ async def _build_game_library(self):
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,
Expand Down Expand Up @@ -200,7 +200,7 @@ async def _build_media_items(self, title, category):
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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit d5bf274

Please sign in to comment.