mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
prevent running migrations if is_fresh_install
+ fix: sqlite3.ProgrammingError: Cannot operate on a closed cursor on ProcessAlbumColors() + move processing artist images from periodic_scans to Populate + bump hash string limit from 7 to 10 + add last_mod property to database + fix: TypeError: '<' not supported between instances of 'int' and 'str' on album page
This commit is contained in:
+15
-1
@@ -52,6 +52,18 @@ class TrackStore:
|
||||
cls.tracks.remove(track)
|
||||
break
|
||||
|
||||
@classmethod
|
||||
def remove_tracks_by_filepaths(cls, filepaths: list[str]):
|
||||
"""
|
||||
Removes multiple tracks from the store by their filepaths.
|
||||
"""
|
||||
|
||||
paths_str = "~".join(filepaths)
|
||||
|
||||
for track in cls.tracks:
|
||||
if track.filepath in paths_str:
|
||||
cls.tracks.remove(track)
|
||||
|
||||
@classmethod
|
||||
def remove_tracks_by_dir_except(cls, dirs: list[str]):
|
||||
"""Removes all tracks not in the root directories."""
|
||||
@@ -98,7 +110,9 @@ class TrackStore:
|
||||
track.is_favorite = False
|
||||
|
||||
@classmethod
|
||||
def append_track_artists(cls, albumhash: str, artists: list[str], new_album_title: str):
|
||||
def append_track_artists(
|
||||
cls, albumhash: str, artists: list[str], new_album_title: str
|
||||
):
|
||||
tracks = cls.get_tracks_by_albumhash(albumhash)
|
||||
|
||||
for track in tracks:
|
||||
|
||||
Reference in New Issue
Block a user