Select next track after header

Fixes #209
This commit is contained in:
Keith Edmunds 2023-12-07 23:04:25 +00:00
parent 243bc765f9
commit 6391490f9d

View File

@ -306,7 +306,13 @@ class PlaylistModel(QAbstractTableModel):
if unplayed_rows:
try:
# Find next row after current track
next_row = min([a for a in unplayed_rows if a > row_number])
next_row = min(
[
a
for a in unplayed_rows
if a > row_number and not self.is_header_row(a)
]
)
except ValueError:
# Find first unplayed track
next_row = min(unplayed_rows)