From 91cef9e50674e406358eaf95eb501356f8ddd5c1 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Fri, 22 Dec 2023 08:14:51 +0000 Subject: [PATCH] Fix bug moving unplayed tracks between playlists --- app/playlistmodel.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/playlistmodel.py b/app/playlistmodel.py index 698831a..fd7042e 100644 --- a/app/playlistmodel.py +++ b/app/playlistmodel.py @@ -877,18 +877,16 @@ class PlaylistModel(QAbstractTableModel): self.invalidate_rows(list(row_map.keys())) def move_rows_between_playlists( - self, from_rows: List[int], to_row_number: int, to_playlist_model: PlaylistModel + self, from_rows: List[int], to_row_number: int, to_playlist_id: int ) -> None: """ Move the playlist rows given to to_row and below of to_playlist. """ log.info( - f"move_rows_between_playlists({from_rows=}, {to_row_number=}, {to_playlist_model=}" + f"move_rows_between_playlists({from_rows=}, {to_row_number=}, {to_playlist_id=}" ) - to_playlist_id = to_playlist_model.playlist_id - # Row removal must be wrapped in beginRemoveRows .. # endRemoveRows and the row range must be contiguous. Process # the highest rows first so the lower row numbers are unchanged