From b92731d37c0775a71fe4ca05d3036548c45b72e5 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Mon, 20 Jun 2022 00:07:32 +0200 Subject: [PATCH] Fix error when items are deleted from file provider (#377) --- music_assistant/music_providers/filesystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.""" -- 2.34.1