rettelser
This commit is contained in:
@@ -20,6 +20,7 @@ class PlaylistBrowserDialog(QDialog):
|
||||
"""Kombineret gem/hent dialog til danselister."""
|
||||
|
||||
playlist_selected = pyqtSignal(int, str) # playlist_id, name
|
||||
sync_requested = pyqtSignal() # bed main_window om at køre sync
|
||||
|
||||
def __init__(self, mode: str = "load", current_songs: list = None,
|
||||
current_name: str = "", parent=None):
|
||||
@@ -344,10 +345,11 @@ class PlaylistBrowserDialog(QDialog):
|
||||
)
|
||||
if reply == QMessageBox.StandardButton.Yes:
|
||||
try:
|
||||
from local.local_db import get_db
|
||||
with get_db() as conn:
|
||||
conn.execute("DELETE FROM playlists WHERE id=?", (pl["id"],))
|
||||
from local.local_db import delete_playlist
|
||||
delete_playlist(pl["id"])
|
||||
self._load_data()
|
||||
# Signal til main_window om at køre sync
|
||||
self.sync_requested.emit()
|
||||
except Exception as e:
|
||||
QMessageBox.warning(self, "Fejl", f"Kunne ikke slette: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user