db struktur
This commit is contained in:
@@ -159,11 +159,11 @@ def run_acoustid_scan(db_path: str, api_key: str = "", on_progress=None, stop_ev
|
||||
conn.row_factory = sqlite3.Row
|
||||
|
||||
rows = conn.execute("""
|
||||
SELECT id, local_path, title, artist
|
||||
FROM songs
|
||||
WHERE (mbid IS NULL OR mbid = '')
|
||||
AND file_missing = 0
|
||||
AND local_path IS NOT NULL AND local_path != ''
|
||||
SELECT s.id, s.title, s.artist, f.local_path
|
||||
FROM songs s
|
||||
JOIN files f ON f.song_id = s.id AND f.file_missing = 0
|
||||
WHERE (s.mbid IS NULL OR s.mbid = '')
|
||||
AND f.local_path IS NOT NULL AND f.local_path != ''
|
||||
ORDER BY RANDOM()
|
||||
LIMIT ?
|
||||
""", (MAX_PER_SESSION,)).fetchall()
|
||||
@@ -284,4 +284,4 @@ class AcoustIDWorker:
|
||||
self._stop_event.set()
|
||||
|
||||
def is_running(self) -> bool:
|
||||
return self._running
|
||||
return self._running
|
||||
Reference in New Issue
Block a user