From 9dd2da9ea9e45c163b37941a64124230e9f5a7f3 Mon Sep 17 00:00:00 2001 From: Melvyn Harbour Date: Wed, 19 Jun 2024 10:26:21 +0100 Subject: [PATCH] Prevent overwriting album_tracks table (#1388) --- music_assistant/server/controllers/media/tracks.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/music_assistant/server/controllers/media/tracks.py b/music_assistant/server/controllers/media/tracks.py index 40402af6..2850dc8d 100644 --- a/music_assistant/server/controllers/media/tracks.py +++ b/music_assistant/server/controllers/media/tracks.py @@ -410,16 +410,6 @@ class TracksController(MediaControllerBase[Track]): For digital releases, the discnumber will be just 0 or 1. Track number should start counting at 1. """ - if overwrite and album.provider.startswith("filesystem"): - # on overwrite, clear the album_tracks table first - # this is done for filesystem providers only (to account for changing ID3 tags) - # TODO: find a better way to deal with this as this doesn't cover all (edge) cases - await self.mass.music.database.delete( - DB_TABLE_ALBUM_TRACKS, - { - "track_id": db_id, - }, - ) db_album: Album | ItemMapping = None if album.provider == "library": db_album = album -- 2.34.1