mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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:
|
||||
item_id = "A:ALBUMARTIST/" + "/".join(item_id.split("/")[2:])
|
||||
|
||||
for item in media_library.browse_by_idstring(
|
||||
search_type,
|
||||
"/".join(item_id.split("/")[:-1]),
|
||||
full_album_art_uri=True,
|
||||
max_items=0,
|
||||
):
|
||||
if item.item_id == item_id:
|
||||
return item
|
||||
search_term = item_id.split("/")[-1]
|
||||
matches = media_library.get_music_library_information(
|
||||
search_type, search_term=search_term, full_album_art_uri=True
|
||||
)
|
||||
if len(matches) > 0:
|
||||
return matches[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user