break down store.py into multiple files in a module

+ fix last updated date bug
This commit is contained in:
geoffrey45
2023-03-25 03:05:38 +03:00
parent 43c480cf3e
commit d43dcbff46
26 changed files with 688 additions and 636 deletions
+3 -3
View File
@@ -5,16 +5,16 @@ import os
from tqdm import tqdm
from app.db.store import Store
from app.db.sqlite.tracks import SQLiteTrackMethods as tdb
from app.store.tracks import TrackStore
def validate_tracks() -> None:
"""
Gets all songs under the ~/ directory.
"""
for track in tqdm(Store.tracks, desc="Removing deleted tracks"):
for track in tqdm(TrackStore.tracks, desc="Removing deleted tracks"):
if not os.path.exists(track.filepath):
print(f"Removing {track.filepath}")
Store.tracks.remove(track)
TrackStore.tracks.remove(track)
tdb.remove_track_by_filepath(track.filepath)