]> kaliko git repositories - mpd-sima.git/blobdiff - sima/lib/simadb.py
New, slightly enhanced, meta Objects.
[mpd-sima.git] / sima / lib / simadb.py
index 6f881444efb8ab430052ff61b83355b74a31542e..280b23d228a8f885b3449920ca61f4f0f542fa20 100644 (file)
@@ -188,7 +188,7 @@ class SimaDB(object):
         get album information from the database.
         if not in database insert new entry.
         Attention: use Track() object!!
-        Use AlbumArtist tag is provided, fallback to Album tag
+        Use AlbumArtist tag if provided, fallback to Album tag
         """
         if with_connection:
             connection = with_connection
@@ -606,7 +606,7 @@ class SimaDB(object):
             "SELECT artist FROM albums")] +
             [row[0] for row in connection.execute(
             "SELECT artist FROM tracks")])
-        orphans = [ (orphan,) for orphan in artists_ids - artist_2_artist_ids ]
+        orphans = [(orphan,) for orphan in artists_ids - artist_2_artist_ids]
         connection.executemany('DELETE FROM artists WHERE id = (?);', orphans)
         if not with_connection:
             connection.commit()
@@ -626,7 +626,7 @@ class SimaDB(object):
             """SELECT albums.id FROM albums
             LEFT JOIN tracks ON albums.id = tracks.album
             WHERE tracks.album IS NULL""")])
-        orphans = [ (orphan,) for orphan in orphan_black_ids & orphan_tracks_ids ]
+        orphans = [(orphan,) for orphan in orphan_black_ids & orphan_tracks_ids]
         connection.executemany('DELETE FROM albums WHERE id = (?);', orphans)
         if not with_connection:
             connection.commit()
@@ -646,7 +646,7 @@ class SimaDB(object):
             """SELECT tracks.id FROM tracks
             LEFT JOIN black_list ON tracks.id = black_list.track
             WHERE black_list.track IS NULL""")])
-        orphans = [ (orphan,) for orphan in hist_orphan_ids & black_list_orphan_ids ]
+        orphans = [(orphan,) for orphan in hist_orphan_ids & black_list_orphan_ids]
         connection.executemany('DELETE FROM tracks WHERE id = (?);', orphans)
         if not with_connection:
             connection.commit()