From f494da3647bef07f0e5bf0f1d71e25ab7c8734ad Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Fri, 3 Oct 2025 20:42:10 +0200 Subject: [PATCH] Fix Artist logo images from TheAudioDb --- music_assistant/controllers/metadata.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/music_assistant/controllers/metadata.py b/music_assistant/controllers/metadata.py index 551379ec..b28c6b9e 100644 --- a/music_assistant/controllers/metadata.py +++ b/music_assistant/controllers/metadata.py @@ -186,14 +186,13 @@ class MetaDataController(CoreController): # just run the scan for missing metadata once at startup # background scan for missing metadata self.mass.call_later(300, self._scan_missing_metadata) - # migrate old image path for collage images from absolute to relative - # TODO: remove this after 2.5+ release - old_path = f"{self.mass.storage_path}/collage_images/" - new_path = "/collage/" + # migrate theaudiodb images to new url + # they updated their cdn url to r2.theaudiodb.com + # TODO: remove this after 2.7 release query = ( - "UPDATE playlists SET metadata = " - f"REPLACE (metadata, '{old_path}', '{new_path}') " - f"WHERE playlists.metadata LIKE '%{old_path}%'" + "UPDATE artists SET metadata = " + "REPLACE (metadata, 'https://www.theaudiodb.com', 'https://r2.theaudiodb.com') " + "WHERE artists.metadata LIKE '%https://www.theaudiodb.com%'" ) if self.mass.music.database: await self.mass.music.database.execute(query) -- 2.34.1