Remove media class apps and channels (#39864)

This commit is contained in:
Martin Hjelmare 2020-09-09 22:19:52 +02:00 committed by Paulus Schoutsen
parent f79ce7bd04
commit c5cf95c14b
4 changed files with 6 additions and 12 deletions

View File

@ -31,10 +31,8 @@ DOMAIN = "media_player"
MEDIA_CLASS_ALBUM = "album" MEDIA_CLASS_ALBUM = "album"
MEDIA_CLASS_APP = "app" MEDIA_CLASS_APP = "app"
MEDIA_CLASS_APPS = "apps"
MEDIA_CLASS_ARTIST = "artist" MEDIA_CLASS_ARTIST = "artist"
MEDIA_CLASS_CHANNEL = "channel" MEDIA_CLASS_CHANNEL = "channel"
MEDIA_CLASS_CHANNELS = "channels"
MEDIA_CLASS_COMPOSER = "composer" MEDIA_CLASS_COMPOSER = "composer"
MEDIA_CLASS_CONTRIBUTING_ARTIST = "contributing_artist" MEDIA_CLASS_CONTRIBUTING_ARTIST = "contributing_artist"
MEDIA_CLASS_DIRECTORY = "directory" MEDIA_CLASS_DIRECTORY = "directory"

View File

@ -6,7 +6,6 @@ from typing import List, Optional, Tuple
from homeassistant.components.media_player import BrowseMedia from homeassistant.components.media_player import BrowseMedia
from homeassistant.components.media_player.const import ( from homeassistant.components.media_player.const import (
MEDIA_CLASS_CHANNEL, MEDIA_CLASS_CHANNEL,
MEDIA_CLASS_CHANNELS,
MEDIA_TYPE_CHANNEL, MEDIA_TYPE_CHANNEL,
MEDIA_TYPE_CHANNELS, MEDIA_TYPE_CHANNELS,
) )
@ -54,7 +53,7 @@ class MediaSourceItem:
base = BrowseMediaSource( base = BrowseMediaSource(
domain=None, domain=None,
identifier=None, identifier=None,
media_class=MEDIA_CLASS_CHANNELS, media_class=MEDIA_CLASS_CHANNEL,
media_content_type=MEDIA_TYPE_CHANNELS, media_content_type=MEDIA_TYPE_CHANNELS,
title="Media Sources", title="Media Sources",
can_play=False, can_play=False,

View File

@ -12,7 +12,6 @@ from homeassistant.components.media_player import (
) )
from homeassistant.components.media_player.const import ( from homeassistant.components.media_player.const import (
MEDIA_CLASS_CHANNEL, MEDIA_CLASS_CHANNEL,
MEDIA_CLASS_CHANNELS,
MEDIA_TYPE_CHANNEL, MEDIA_TYPE_CHANNEL,
MEDIA_TYPE_CHANNELS, MEDIA_TYPE_CHANNELS,
SUPPORT_BROWSE_MEDIA, SUPPORT_BROWSE_MEDIA,
@ -290,7 +289,7 @@ class PhilipsTVMediaPlayer(MediaPlayerEntity):
return BrowseMedia( return BrowseMedia(
title="Channels", title="Channels",
media_class=MEDIA_CLASS_CHANNELS, media_class=MEDIA_CLASS_CHANNEL,
media_content_id="", media_content_id="",
media_content_type=MEDIA_TYPE_CHANNELS, media_content_type=MEDIA_TYPE_CHANNELS,
can_play=False, can_play=False,

View File

@ -12,9 +12,7 @@ from homeassistant.components.media_player import (
) )
from homeassistant.components.media_player.const import ( from homeassistant.components.media_player.const import (
MEDIA_CLASS_APP, MEDIA_CLASS_APP,
MEDIA_CLASS_APPS,
MEDIA_CLASS_CHANNEL, MEDIA_CLASS_CHANNEL,
MEDIA_CLASS_CHANNELS,
MEDIA_CLASS_DIRECTORY, MEDIA_CLASS_DIRECTORY,
MEDIA_TYPE_APP, MEDIA_TYPE_APP,
MEDIA_TYPE_APPS, MEDIA_TYPE_APPS,
@ -95,7 +93,7 @@ def browse_media_library(channels: bool = False) -> BrowseMedia:
library_info.children.append( library_info.children.append(
BrowseMedia( BrowseMedia(
title="Apps", title="Apps",
media_class=MEDIA_CLASS_APPS, media_class=MEDIA_CLASS_APP,
media_content_id="apps", media_content_id="apps",
media_content_type=MEDIA_TYPE_APPS, media_content_type=MEDIA_TYPE_APPS,
can_expand=True, can_expand=True,
@ -107,7 +105,7 @@ def browse_media_library(channels: bool = False) -> BrowseMedia:
library_info.children.append( library_info.children.append(
BrowseMedia( BrowseMedia(
title="Channels", title="Channels",
media_class=MEDIA_CLASS_CHANNELS, media_class=MEDIA_CLASS_CHANNEL,
media_content_id="channels", media_content_id="channels",
media_content_type=MEDIA_TYPE_CHANNELS, media_content_type=MEDIA_TYPE_CHANNELS,
can_expand=True, can_expand=True,
@ -294,7 +292,7 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity):
if media_content_type == MEDIA_TYPE_APPS: if media_content_type == MEDIA_TYPE_APPS:
response = BrowseMedia( response = BrowseMedia(
title="Apps", title="Apps",
media_class=MEDIA_CLASS_APPS, media_class=MEDIA_CLASS_APP,
media_content_id="apps", media_content_id="apps",
media_content_type=MEDIA_TYPE_APPS, media_content_type=MEDIA_TYPE_APPS,
can_expand=True, can_expand=True,
@ -316,7 +314,7 @@ class RokuMediaPlayer(RokuEntity, MediaPlayerEntity):
if media_content_type == MEDIA_TYPE_CHANNELS: if media_content_type == MEDIA_TYPE_CHANNELS:
response = BrowseMedia( response = BrowseMedia(
title="Channels", title="Channels",
media_class=MEDIA_CLASS_CHANNELS, media_class=MEDIA_CLASS_CHANNEL,
media_content_id="channels", media_content_id="channels",
media_content_type=MEDIA_TYPE_CHANNELS, media_content_type=MEDIA_TYPE_CHANNELS,
can_expand=True, can_expand=True,