[vlc-commits] [Git][videolan/vlc][master] macosx: React to more media library change events
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Jul 9 21:36:53 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
7fdcf692 by Claudio Cambra at 2022-07-09T21:36:47+00:00
macosx: React to more media library change events
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryModel.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryModel.m
=====================================
@@ -57,6 +57,9 @@ NSString *VLCLibraryModelMediaItemUpdated = @"VLCLibraryModelMediaItemUpdated";
- (void)updateCachedListOfAudioMedia;
- (void)updateCachedListOfVideoMedia;
- (void)updateCachedListOfRecentMedia;
+- (void)updateCachedListOfArtists;
+- (void)updateCachedListOfAlbums;
+- (void)updateCachedListOfGenres;
- (void)mediaItemWasUpdated:(VLCMediaLibraryMediaItem *)mediaItem;
@end
@@ -87,6 +90,36 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
});
}
break;
+ case VLC_ML_EVENT_ARTIST_ADDED:
+ case VLC_ML_EVENT_ARTIST_UPDATED:
+ case VLC_ML_EVENT_ARTIST_DELETED:
+ {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ VLCLibraryModel *libraryModel = (__bridge VLCLibraryModel *)p_data;
+ [libraryModel updateCachedListOfArtists];
+ });
+ break;
+ }
+ case VLC_ML_EVENT_ALBUM_ADDED:
+ case VLC_ML_EVENT_ALBUM_UPDATED:
+ case VLC_ML_EVENT_ALBUM_DELETED:
+ {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ VLCLibraryModel *libraryModel = (__bridge VLCLibraryModel *)p_data;
+ [libraryModel updateCachedListOfAlbums];
+ });
+ break;
+ }
+ case VLC_ML_EVENT_GENRE_ADDED:
+ case VLC_ML_EVENT_GENRE_UPDATED:
+ case VLC_ML_EVENT_GENRE_DELETED:
+ {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ VLCLibraryModel *libraryModel = (__bridge VLCLibraryModel *)p_data;
+ [libraryModel updateCachedListOfGenres];
+ });
+ break;
+ }
default:
break;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7fdcf692b20dc128fdf1b8602d24df40814392fe
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7fdcf692b20dc128fdf1b8602d24df40814392fe
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list