mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Fix spotify media browser category (#39888)
This commit is contained in:
parent
bb661ad083
commit
b49e6243d1
@ -15,6 +15,7 @@ from homeassistant.components.media_player.const import (
|
|||||||
MEDIA_CLASS_ARTIST,
|
MEDIA_CLASS_ARTIST,
|
||||||
MEDIA_CLASS_DIRECTORY,
|
MEDIA_CLASS_DIRECTORY,
|
||||||
MEDIA_CLASS_EPISODE,
|
MEDIA_CLASS_EPISODE,
|
||||||
|
MEDIA_CLASS_GENRE,
|
||||||
MEDIA_CLASS_PLAYLIST,
|
MEDIA_CLASS_PLAYLIST,
|
||||||
MEDIA_CLASS_PODCAST,
|
MEDIA_CLASS_PODCAST,
|
||||||
MEDIA_CLASS_TRACK,
|
MEDIA_CLASS_TRACK,
|
||||||
@ -113,7 +114,7 @@ CONTENT_TYPE_MEDIA_CLASS = {
|
|||||||
"current_user_top_artists": MEDIA_CLASS_ARTIST,
|
"current_user_top_artists": MEDIA_CLASS_ARTIST,
|
||||||
"current_user_top_tracks": MEDIA_CLASS_TRACK,
|
"current_user_top_tracks": MEDIA_CLASS_TRACK,
|
||||||
"featured_playlists": MEDIA_CLASS_PLAYLIST,
|
"featured_playlists": MEDIA_CLASS_PLAYLIST,
|
||||||
"categories": MEDIA_CLASS_DIRECTORY,
|
"categories": MEDIA_CLASS_GENRE,
|
||||||
"category_playlists": MEDIA_CLASS_PLAYLIST,
|
"category_playlists": MEDIA_CLASS_PLAYLIST,
|
||||||
"new_releases": MEDIA_CLASS_ALBUM,
|
"new_releases": MEDIA_CLASS_ALBUM,
|
||||||
MEDIA_TYPE_PLAYLIST: MEDIA_CLASS_PLAYLIST,
|
MEDIA_TYPE_PLAYLIST: MEDIA_CLASS_PLAYLIST,
|
||||||
@ -566,6 +567,7 @@ def build_item_response(spotify, user, payload):
|
|||||||
can_expand=True,
|
can_expand=True,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
return media_item
|
||||||
|
|
||||||
if title is None:
|
if title is None:
|
||||||
if "name" in media:
|
if "name" in media:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user