rettelser
This commit is contained in:
@@ -39,6 +39,7 @@ class PlaylistPanel(QWidget):
|
||||
playlist_changed = pyqtSignal()
|
||||
event_started = pyqtSignal()
|
||||
next_song_ready = pyqtSignal(dict) # udsendes når næste sang ændres — main_window indlæser den # udsendes af Start event — main_window indlæser første sang # udsendes ved enhver ændring → trigger autogem
|
||||
sync_requested = pyqtSignal() # bed main_window om at køre sync (efter sletning)
|
||||
|
||||
STATUS_ICON = {"pending": " ", "playing": " ▶ ", "played": " ✓ ", "skipped": " — ", "next": " ▷ "}
|
||||
STATUS_COLOR = {"pending": "#5a6070", "playing": "#e8a020", "played": "#2ecc71", "skipped": "#e74c3c", "next": "#3b8fd4"}
|
||||
@@ -526,6 +527,7 @@ class PlaylistPanel(QWidget):
|
||||
self._btn_save_current.setToolTip(f"Gem ændringer til '{name}'")
|
||||
self._save_named_playlist_id(pl_id)
|
||||
dialog.playlist_selected.connect(on_saved)
|
||||
dialog.sync_requested.connect(self._request_sync)
|
||||
dialog.exec()
|
||||
|
||||
def _save_current(self):
|
||||
@@ -572,10 +574,15 @@ class PlaylistPanel(QWidget):
|
||||
except Exception as e:
|
||||
QMessageBox.warning(self, "Fejl", f"Kunne ikke gemme: {e}")
|
||||
|
||||
def _request_sync(self):
|
||||
"""Bobl sync-anmodning op til main_window."""
|
||||
self.sync_requested.emit()
|
||||
|
||||
def _load_dialog(self):
|
||||
from ui.playlist_browser import PlaylistBrowserDialog
|
||||
dialog = PlaylistBrowserDialog(mode="load", parent=self.window())
|
||||
dialog.playlist_selected.connect(self._load_playlist_by_id)
|
||||
dialog.sync_requested.connect(self._request_sync)
|
||||
dialog.exec()
|
||||
|
||||
def _load_playlist_by_id(self, pl_id: int, pl_name: str):
|
||||
|
||||
Reference in New Issue
Block a user