From: Marcel van der Veldt Date: Sun, 19 Jun 2022 22:07:32 +0000 (+0200) Subject: Fix error when items are deleted from file provider (#377) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=b92731d37c0775a71fe4ca05d3036548c45b72e5;p=music-assistant-server.git Fix error when items are deleted from file provider (#377) --- diff --git a/music_assistant/music_providers/filesystem.py b/music_assistant/music_providers/filesystem.py index 9680a8e9..aa9162d0 100644 --- a/music_assistant/music_providers/filesystem.py +++ b/music_assistant/music_providers/filesystem.py @@ -248,7 +248,7 @@ class FileSystemProvider(MusicProvider): if album_tracks: continue # album has no more tracks attached, delete prov mapping - await self.mass.music.albums.remove_prov_mapping(album_id) + await self.mass.music.albums.remove_prov_mapping(album_id, self.id) # check if artists are deleted for artist_id in artists: artist = await self.mass.music.artists.get_db_item(artist_id) @@ -262,7 +262,7 @@ class FileSystemProvider(MusicProvider): if artist_albums: continue # artist has no more tracks attached, delete prov mapping - await self.mass.music.artists.remove_prov_mapping(artist_id) + await self.mass.music.artists.remove_prov_mapping(artist_id, self.id) async def get_artist(self, prov_artist_id: str) -> Artist: """Get full artist details by id."""