Bedre tag sync
This commit is contained in:
@@ -213,10 +213,16 @@ def run_acoustid_scan(db_path: str, api_key: str = "", on_progress=None, stop_ev
|
||||
if result:
|
||||
mbid = result.get("mbid", "")
|
||||
acoustid = result.get("acoustid", "")
|
||||
# Opdater acoustid altid, men kun mbid hvis det ikke allerede bruges
|
||||
conn.execute(
|
||||
"UPDATE songs SET mbid=?, acoustid=? WHERE id=?",
|
||||
(mbid or None, acoustid or None, row["id"])
|
||||
"UPDATE songs SET acoustid=? WHERE id=?",
|
||||
(acoustid or None, row["id"])
|
||||
)
|
||||
if mbid:
|
||||
conn.execute(
|
||||
"UPDATE songs SET mbid=? WHERE id=? AND (mbid IS NULL OR mbid='')",
|
||||
(mbid, row["id"])
|
||||
)
|
||||
conn.commit()
|
||||
found += 1
|
||||
total_found += 1
|
||||
|
||||
Reference in New Issue
Block a user