From 1b48459eaa11fcad20ff40a5326bd59c54aaad43 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 18 Feb 2022 02:23:08 -0800 Subject: [PATCH] Track number column should also sort by disc Apparently, the sort descriptors are going by data members of the array, not by the column identifiers, or their textual contents. Signed-off-by: Christopher Snowhill --- Playlist/PlaylistController.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index a6d2e6207..581fd36c8 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -447,6 +447,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc [[NSSortDescriptor alloc] initWithKey:@"album" ascending:ascending selector:@selector(caseInsensitiveCompare:)], + [[NSSortDescriptor alloc] initWithKey:@"disc" // Yes, this, even though it's not actually a column + ascending:ascending + selector:@selector(compareTrackNumbers:)], [[NSSortDescriptor alloc] initWithKey:@"track" ascending:ascending selector:@selector(compareTrackNumbers:)]