diff --git a/app/playlistmodel.py b/app/playlistmodel.py index d9a3015..538cd6a 100644 --- a/app/playlistmodel.py +++ b/app/playlistmodel.py @@ -1109,7 +1109,7 @@ class PlaylistModel(QAbstractTableModel): track_sequence.current, track_sequence.previous, ]: - if ts and ts.row_number: + if ts and ts.playlist_id == self.playlist_id and ts.row_number: plr = session.get(PlaylistRows, ts.plr_id) if plr and plr.plr_rownum != ts.row_number: ts.row_number = plr.plr_rownum @@ -1472,7 +1472,7 @@ class PlaylistModel(QAbstractTableModel): current_track_row = None next_track_row = None - if track_sequence.current: + if track_sequence.current and track_sequence.current.playlist_id == self.playlist_id: current_track_row = track_sequence.current.row_number # Update current track details now so that they are available # when we deal with next track row which may be above current @@ -1481,7 +1481,7 @@ class PlaylistModel(QAbstractTableModel): update_rows, track_sequence.current.start_time ) - if track_sequence.next: + if track_sequence.next and track_sequence.next.playlist_id == self.playlist_id: next_track_row = track_sequence.next.row_number for row_number in range(row_count):