mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Fix Sonos cover art when browsing albums (#75105)
This commit is contained in:
parent
f453726b18
commit
3f512e38db
@ -500,11 +500,9 @@ def get_media(
|
|||||||
if not item_id.startswith("A:ALBUM") and search_type == SONOS_ALBUM:
|
if not item_id.startswith("A:ALBUM") and search_type == SONOS_ALBUM:
|
||||||
item_id = "A:ALBUMARTIST/" + "/".join(item_id.split("/")[2:])
|
item_id = "A:ALBUMARTIST/" + "/".join(item_id.split("/")[2:])
|
||||||
|
|
||||||
for item in media_library.browse_by_idstring(
|
search_term = item_id.split("/")[-1]
|
||||||
search_type,
|
matches = media_library.get_music_library_information(
|
||||||
"/".join(item_id.split("/")[:-1]),
|
search_type, search_term=search_term, full_album_art_uri=True
|
||||||
full_album_art_uri=True,
|
)
|
||||||
max_items=0,
|
if len(matches) > 0:
|
||||||
):
|
return matches[0]
|
||||||
if item.item_id == item_id:
|
|
||||||
return item
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user