mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
add function to validate albums
+ extract colors in watchdogg + rename color db files
This commit is contained in:
@@ -11,9 +11,9 @@ from app.store.tracks import TrackStore
|
||||
|
||||
def validate_tracks() -> None:
|
||||
"""
|
||||
Gets all songs under the ~/ directory.
|
||||
Removes track records whose files no longer exist.
|
||||
"""
|
||||
for track in tqdm(TrackStore.tracks, desc="Checking for deleted tracks"):
|
||||
for track in tqdm(TrackStore.tracks, desc="Validating tracks"):
|
||||
if not os.path.exists(track.filepath):
|
||||
TrackStore.remove_track_obj(track)
|
||||
tdb.remove_tracks_by_filepaths(track.filepath)
|
||||
|
||||
Reference in New Issue
Block a user