From 468ecda4507b7ea4cac3e077e8aaa5324a972ba6 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Sat, 10 Feb 2024 09:11:28 +0000 Subject: [PATCH] Don't copy header rows when moving unplayed tracks Fixes #222 --- app/playlistmodel.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/playlistmodel.py b/app/playlistmodel.py index 31dcf95..ff0948a 100644 --- a/app/playlistmodel.py +++ b/app/playlistmodel.py @@ -570,7 +570,11 @@ class PlaylistModel(QAbstractTableModel): Return a list of unplayed row numbers """ - result = [a.plr_rownum for a in self.playlist_rows.values() if not a.played] + result = [ + a.plr_rownum + for a in self.playlist_rows.values() + if not a.played and a.track_id is not None + ] log.info(f"get_unplayed_rows() returned: {result=}") return result