diff --git a/app/playlists.py b/app/playlists.py index 904227b..43847aa 100644 --- a/app/playlists.py +++ b/app/playlists.py @@ -494,7 +494,14 @@ class PlaylistTab(QTableWidget): return [plr for plr in plrs if plr is not None] def hide_played_tracks(self, hide: bool) -> None: - """Hide played tracks if hide is True else show them""" + """ + Hide played tracks if hide is True else show them + + Never hide current or next track + """ + + current_next = [self._get_current_track_row_number(), + self._get_next_track_row_number()] with Session() as session: played = [ @@ -502,6 +509,8 @@ class PlaylistTab(QTableWidget): session, self.playlist_id) ] for row in range(self.rowCount()): + if row in current_next: + continue if row in played: if hide: self.hideRow(row)