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):
|
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:
|
||||||
next_plr = session.get(PlaylistRows, track_sequence.next.plr_id)
|
if track_sequence.next.plr_id:
|
||||||
if (
|
next_plr = session.get(PlaylistRows, track_sequence.next.plr_id)
|
||||||
next_plr
|
if (
|
||||||
and next_plr.plr_rownum == source_row
|
next_plr
|
||||||
and next_plr.playlist_id == self.playlist_model.playlist_id
|
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)
|
return True
|
||||||
if (
|
if track_sequence.now.plr_id:
|
||||||
now_plr
|
now_plr = session.get(PlaylistRows, track_sequence.now.plr_id)
|
||||||
and now_plr.plr_rownum == source_row
|
if (
|
||||||
and now_plr.playlist_id == self.playlist_model.playlist_id
|
now_plr
|
||||||
):
|
and now_plr.plr_rownum == source_row
|
||||||
return True
|
and now_plr.playlist_id == self.playlist_model.playlist_id
|
||||||
|
):
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
return super().filterAcceptsRow(source_row, source_parent)
|
return super().filterAcceptsRow(source_row, source_parent)
|
||||||
|
|
||||||
|
|||||||
@ -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()),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user