Playlist fejl
This commit is contained in:
@@ -20,7 +20,7 @@ class PlaylistManagerDialog(QDialog):
|
||||
2. Indlæs gemt liste
|
||||
3. Importer fra fil (M3U / M3U8 / tekst)
|
||||
"""
|
||||
playlist_loaded = pyqtSignal(str, list) # (navn, liste af dict)
|
||||
playlist_loaded = pyqtSignal(str, list, int) # (navn, sange, pl_id)
|
||||
|
||||
def __init__(self, current_songs: list[dict], parent=None):
|
||||
super().__init__(parent)
|
||||
@@ -161,7 +161,7 @@ class PlaylistManagerDialog(QDialog):
|
||||
"file_missing": bool(row.get("file_missing", False)),
|
||||
"dances": [d["name"] for d in dances],
|
||||
})
|
||||
self.playlist_loaded.emit(pl["name"], songs)
|
||||
self.playlist_loaded.emit(pl["name"], songs, pl["id"])
|
||||
self._load_status.setText(f"✓ Indlæst: {pl['name']} ({len(songs)} sange)")
|
||||
except Exception as e:
|
||||
self._load_status.setText(f"Fejl: {e}")
|
||||
@@ -316,7 +316,7 @@ class PlaylistManagerDialog(QDialog):
|
||||
missing.append(p)
|
||||
|
||||
if found:
|
||||
self.playlist_loaded.emit(name, found)
|
||||
self.playlist_loaded.emit(name, found, 0)
|
||||
status = f"✓ Importeret {len(found)} sange som \"{name}\""
|
||||
if missing:
|
||||
status += f"\n⚠ {len(missing)} filer ikke fundet"
|
||||
|
||||
Reference in New Issue
Block a user