Synk virker
This commit is contained in:
@@ -19,7 +19,7 @@ from PyQt6.QtGui import QColor
|
||||
class PlaylistBrowserDialog(QDialog):
|
||||
"""Kombineret gem/hent dialog til danselister."""
|
||||
|
||||
playlist_selected = pyqtSignal(int, str) # playlist_id, name
|
||||
playlist_selected = pyqtSignal(str, 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,
|
||||
@@ -315,7 +315,9 @@ class PlaylistBrowserDialog(QDialog):
|
||||
)
|
||||
for i, song in enumerate(self._current_songs, start=1):
|
||||
if song.get("id"):
|
||||
add_song_to_playlist(pl_id, song["id"], position=i)
|
||||
add_song_to_playlist(pl_id, song["id"],
|
||||
file_id=song.get("file_id"),
|
||||
position=i)
|
||||
self.playlist_selected.emit(pl_id, name)
|
||||
self.accept()
|
||||
except Exception as e:
|
||||
@@ -327,7 +329,9 @@ class PlaylistBrowserDialog(QDialog):
|
||||
pl_id = create_playlist(name, tags=tags)
|
||||
for i, song in enumerate(self._current_songs, start=1):
|
||||
if song.get("id"):
|
||||
add_song_to_playlist(pl_id, song["id"], position=i)
|
||||
add_song_to_playlist(pl_id, song["id"],
|
||||
file_id=song.get("file_id"),
|
||||
position=i)
|
||||
self.playlist_selected.emit(pl_id, name)
|
||||
self.accept()
|
||||
except Exception as e:
|
||||
@@ -515,4 +519,4 @@ class PlaylistBrowserDialog(QDialog):
|
||||
f"'{name}' er nu linket til server-listen.\n"
|
||||
f"Du har rettighed til at {perm_text} listen.\n\n"
|
||||
f"{matched} af {len(pl_data.get('songs', []))} sange fundet lokalt."
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user