Add Jellyfin media source support for tvshows (#85953)
This commit is contained in:
parent
fe583b7c4a
commit
a35a4efaaa
3 changed files with 146 additions and 6 deletions
|
@ -11,7 +11,12 @@ from homeassistant.components.media_player.browse_media import BrowseMedia
|
|||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .client_wrapper import get_artwork_url
|
||||
from .const import CONTENT_TYPE_MAP, MEDIA_CLASS_MAP, MEDIA_TYPE_NONE
|
||||
from .const import (
|
||||
CONTENT_TYPE_MAP,
|
||||
MEDIA_CLASS_MAP,
|
||||
MEDIA_TYPE_NONE,
|
||||
SUPPORTED_COLLECTION_TYPES,
|
||||
)
|
||||
|
||||
CONTAINER_TYPES_SPECIFIC_MEDIA_CLASS: dict[str, str] = {
|
||||
MediaType.MUSIC: MediaClass.MUSIC,
|
||||
|
@ -22,8 +27,6 @@ CONTAINER_TYPES_SPECIFIC_MEDIA_CLASS: dict[str, str] = {
|
|||
"library": MediaClass.DIRECTORY,
|
||||
}
|
||||
|
||||
JF_SUPPORTED_LIBRARY_TYPES = ["movies", "music", "tvshows"]
|
||||
|
||||
PLAYABLE_MEDIA_TYPES = [
|
||||
MediaType.EPISODE,
|
||||
MediaType.MOVIE,
|
||||
|
@ -65,7 +68,7 @@ async def build_root_response(
|
|||
children = [
|
||||
await item_payload(hass, client, user_id, folder)
|
||||
for folder in folders["Items"]
|
||||
if folder["CollectionType"] in JF_SUPPORTED_LIBRARY_TYPES
|
||||
if folder["CollectionType"] in SUPPORTED_COLLECTION_TYPES
|
||||
]
|
||||
|
||||
return BrowseMedia(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue