From: Marcel van der Veldt Date: Fri, 3 Oct 2025 18:42:10 +0000 (+0200) Subject: Fix Artist logo images from TheAudioDb X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=f494da3647bef07f0e5bf0f1d71e25ab7c8734ad;p=music-assistant-server.git Fix Artist logo images from TheAudioDb --- 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)