]> kaliko git repositories - mpd-sima.git/commitdiff
simadb: Propagate add option
authorkaliko <kaliko@azylum.org>
Sun, 9 May 2021 09:55:35 +0000 (11:55 +0200)
committerkaliko <kaliko@azylum.org>
Sun, 9 May 2021 09:55:35 +0000 (11:55 +0200)
sima/lib/simadb.py

index a66cbd0a53296974d193713f1be21a7b5dfc086b..5646a498f4632f4f11f01b346af6beeaa1ed0a3c 100644 (file)
@@ -604,7 +604,7 @@ class SimaDB:
             connection = with_connection
         else:
             connection = self.get_database_connection()
-        track_id = self.get_track(track, with_connection=connection, add=True)
+        track_id = self.get_track(track, with_connection=connection, add=add)
         rows = connection.execute(
             "SELECT id FROM blocklist WHERE track = ?", (track_id,))
         if not rows.fetchone():
@@ -629,7 +629,7 @@ class SimaDB:
             connection = with_connection
         else:
             connection = self.get_database_connection()
-        album_id = self.get_album(album, with_connection=connection, add=True)
+        album_id = self.get_album(album, with_connection=connection, add=add)
         rows = connection.execute(
             "SELECT id FROM blocklist WHERE album = ?", (album_id,))
         if not rows.fetchone():
@@ -654,7 +654,7 @@ class SimaDB:
             connection = with_connection
         else:
             connection = self.get_database_connection()
-        artist_id = self.get_artist(artist, with_connection=connection, add=True)
+        artist_id = self.get_artist(artist, with_connection=connection, add=add)
         rows = connection.execute(
             "SELECT id FROM blocklist WHERE artist = ?", (artist_id,))
         if not rows.fetchone():