[vlc-commits] [Git][videolan/vlc][work/macosx-rating-sort] macosx: Add rating sorting to audio data source
Claudio Cambra (@claucambra)
gitlab at videolan.org
Tue Nov 3 16:13:44 UTC 2026
Claudio Cambra pushed to branch work/macosx-rating-sort at VideoLAN / VLC
Commits:
a5c47f73 by Claudio Cambra at 2026-11-04T00:13:31+08:00
macosx: Add rating sorting to audio data source
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
2 changed files:
- modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.h
- modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
Changes:
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.h
=====================================
@@ -56,6 +56,7 @@ extern NSString * const VLCLibraryArtistSortDescriptorKey;
extern NSString * const VLCLibraryAlbumSortDescriptorKey;
extern NSString * const VLCLibraryPlayCountSortDescriptorKey;
extern NSString * const VLCLibraryYearSortDescriptorKey;
+extern NSString * const VLCLibraryRatingSortDescriptorKey;
extern NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification;
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
=====================================
@@ -72,6 +72,7 @@ NSString * const VLCLibraryArtistSortDescriptorKey = @"VLCLibraryArtistSortDescr
NSString * const VLCLibraryAlbumSortDescriptorKey = @"VLCLibraryAlbumSortDescriptorKey";
NSString * const VLCLibraryPlayCountSortDescriptorKey = @"VLCLibraryPlayCountSortDescriptorKey";
NSString * const VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescriptorKey";
+NSString * const VLCLibraryRatingSortDescriptorKey = @"VLCLibraryRatingSortDescriptorKey";
// TODO: Add sorting by genre
NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification = @"VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification";
@@ -548,6 +549,9 @@ NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
} else if (existingSortCriteria == VLC_ML_SORTING_RELEASEDATE) {
return VLCLibraryYearSortDescriptorKey;
+ } else if (existingSortCriteria == VLC_ML_SORTING_RATING) {
+ return VLCLibraryRatingSortDescriptorKey;
+
}
return VLCLibraryTitleSortDescriptorKey;
@@ -959,6 +963,9 @@ NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
} else if ([sortDescriptorKey isEqualToString:VLCLibraryYearSortDescriptorKey]) {
return VLC_ML_SORTING_RELEASEDATE;
+ } else if ([sortDescriptorKey isEqualToString:VLCLibraryRatingSortDescriptorKey]) {
+ return VLC_ML_SORTING_RATING;
+
}
return VLC_ML_SORTING_DEFAULT;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a5c47f738d0153d8a11625c3b8b7765f2846385b
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a5c47f738d0153d8a11625c3b8b7765f2846385b
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list