WIP V3: fix minor issues

This commit is contained in:
Keith Edmunds 2023-11-27 15:21:20 +00:00
parent dfb45dd0ff
commit 04f0e95653
2 changed files with 17 additions and 15 deletions

View File

@ -1269,6 +1269,7 @@ class PlaylistProxyModel(QSortFilterProxyModel):
if self.playlist_model.is_played_row(source_row): if self.playlist_model.is_played_row(source_row):
# Don't hide current or next track # Don't hide current or next track
with Session() as session: with Session() as session:
if track_sequence.next.plr_id:
next_plr = session.get(PlaylistRows, track_sequence.next.plr_id) next_plr = session.get(PlaylistRows, track_sequence.next.plr_id)
if ( if (
next_plr next_plr
@ -1276,6 +1277,7 @@ class PlaylistProxyModel(QSortFilterProxyModel):
and next_plr.playlist_id == self.playlist_model.playlist_id and next_plr.playlist_id == self.playlist_model.playlist_id
): ):
return True return True
if track_sequence.now.plr_id:
now_plr = session.get(PlaylistRows, track_sequence.now.plr_id) now_plr = session.get(PlaylistRows, track_sequence.now.plr_id)
if ( if (
now_plr now_plr

View File

@ -618,7 +618,7 @@ class PlaylistTab(QTableView):
self.menu.addSeparator() self.menu.addSeparator()
# Mark unplayed # Mark unplayed
if track_row and model.is_unplayed_row(model_row_number): if track_row and model.is_played_row(model_row_number):
self._add_context_menu( self._add_context_menu(
"Mark unplayed", "Mark unplayed",
lambda: self._mark_as_unplayed(self.get_selected_rows()), lambda: self._mark_as_unplayed(self.get_selected_rows()),