This commit is contained in:
2026-04-14 17:00:29 +02:00
parent 460b41a8c5
commit 4aba2f02a2
10 changed files with 840 additions and 76 deletions

View File

@@ -1,6 +1,8 @@
"""
main_window.py — Linedance afspiller hovedvindue.
"""
import logging
logger = logging.getLogger(__name__)
from PyQt6.QtWidgets import (
QMainWindow, QWidget, QVBoxLayout, QHBoxLayout,
@@ -565,9 +567,11 @@ class MainWindow(QMainWindow):
pass
QTimer.singleShot(5000, self.start_background_scan)
# Start AcoustID fingerprinting efter 60 sekunder hvis aktiveret
if self._settings.get("acoustid_enabled", False):
QTimer.singleShot(60000, self._start_acoustid)
# Start AcoustID fingerprinting efter 10 sekunder hvis aktiveret
acoustid_on = self._settings.get("acoustid_enabled", False)
logger.info(f"AcoustID indstilling: {acoustid_on}")
if acoustid_on:
QTimer.singleShot(10000, self._start_acoustid)
def _start_acoustid(self):
"""Start AcoustID fingerprinting i baggrunden."""
@@ -590,7 +594,10 @@ class MainWindow(QMainWindow):
f"AcoustID: {done}/{total}{title}", 3000
)
self._acoustid_worker.start(on_progress=on_progress)
self._acoustid_worker.start(
api_key=self._settings.get("acoustid_api_key", ""),
on_progress=on_progress,
)
self._set_status("AcoustID fingerprinting startet i baggrunden", 4000)
def start_background_scan(self):