mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
1eac009fde
+ 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
20 lines
520 B
Python
20 lines
520 B
Python
"""
|
|
This library contains all the functions related to tracks.
|
|
"""
|
|
import os
|
|
|
|
from tqdm import tqdm
|
|
|
|
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(TrackStore.tracks, desc="Checking for deleted tracks"):
|
|
if not os.path.exists(track.filepath):
|
|
TrackStore.tracks.remove(track)
|
|
tdb.remove_tracks_by_filepaths(track.filepath)
|