WIP V3: fix minor issues
This commit is contained in:
parent
dfb45dd0ff
commit
04f0e95653
@ -1269,20 +1269,22 @@ class PlaylistProxyModel(QSortFilterProxyModel):
|
||||
if self.playlist_model.is_played_row(source_row):
|
||||
# Don't hide current or next track
|
||||
with Session() as session:
|
||||
next_plr = session.get(PlaylistRows, track_sequence.next.plr_id)
|
||||
if (
|
||||
next_plr
|
||||
and next_plr.plr_rownum == source_row
|
||||
and next_plr.playlist_id == self.playlist_model.playlist_id
|
||||
):
|
||||
return True
|
||||
now_plr = session.get(PlaylistRows, track_sequence.now.plr_id)
|
||||
if (
|
||||
now_plr
|
||||
and now_plr.plr_rownum == source_row
|
||||
and now_plr.playlist_id == self.playlist_model.playlist_id
|
||||
):
|
||||
return True
|
||||
if track_sequence.next.plr_id:
|
||||
next_plr = session.get(PlaylistRows, track_sequence.next.plr_id)
|
||||
if (
|
||||
next_plr
|
||||
and next_plr.plr_rownum == source_row
|
||||
and next_plr.playlist_id == self.playlist_model.playlist_id
|
||||
):
|
||||
return True
|
||||
if track_sequence.now.plr_id:
|
||||
now_plr = session.get(PlaylistRows, track_sequence.now.plr_id)
|
||||
if (
|
||||
now_plr
|
||||
and now_plr.plr_rownum == source_row
|
||||
and now_plr.playlist_id == self.playlist_model.playlist_id
|
||||
):
|
||||
return True
|
||||
return False
|
||||
return super().filterAcceptsRow(source_row, source_parent)
|
||||
|
||||
|
||||
@ -618,7 +618,7 @@ class PlaylistTab(QTableView):
|
||||
self.menu.addSeparator()
|
||||
|
||||
# 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(
|
||||
"Mark unplayed",
|
||||
lambda: self._mark_as_unplayed(self.get_selected_rows()),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user