From: Marcel van der Veldt Date: Wed, 11 May 2022 20:00:36 +0000 (+0200) Subject: add image helper X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=a6fceffd5628369977c9535539dc749dd4aab85c;p=music-assistant-server.git add image helper --- diff --git a/music_assistant/helpers/images.py b/music_assistant/helpers/images.py index 8ab2ea99..1dec4976 100644 --- a/music_assistant/helpers/images.py +++ b/music_assistant/helpers/images.py @@ -38,6 +38,9 @@ async def get_image_url( for img in media_item.metadata.images: if img.type == img_type: return img.url + if img_type == ImageType.THUMB and img.type == ImageType.EMBEDDED_THUMB: + if file_prov := mass.music.get_provider("filesystem"): + return await file_prov.get_embedded_image(img.url) # retry with track's album if media_item.media_type == MediaType.TRACK and media_item.album: