[vlc-commits] [Git][videolan/vlc][master] macosx: Remove unused type->title dicts

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Oct 5 10:07:57 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
42916915 by Claudio Cambra at 2026-10-05T11:54:29+02:00
macosx: Remove unused type->title dicts

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


2 changed files:

- modules/gui/macosx/library/VLCLibraryModel.h
- modules/gui/macosx/library/VLCLibraryModel.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryModel.h
=====================================
@@ -117,10 +117,6 @@ extern NSString * const VLCLibraryModelDiscoveryFailed;
 
 @property (readonly) NSArray <VLCMediaLibraryEntryPoint *> *listOfMonitoredFolders;
 
- at property (readonly) NSDictionary<NSNumber *, NSString *> *albumDict;
- at property (readonly) NSDictionary<NSNumber *, NSString *> *artistDict;
- at property (readonly) NSDictionary<NSNumber *, NSString *> *genreDict;
-
 @property (readwrite, nonatomic) NSString *filterString;
 
 - (size_t)numberOfPlaylistsOfType:(const enum vlc_ml_playlist_type_t)playlistType;


=====================================
modules/gui/macosx/library/VLCLibraryModel.m
=====================================
@@ -640,14 +640,12 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
         vlc_ml_artist_list_t * const p_artist_list = vlc_ml_list_artists(self->_p_mediaLibrary, &queryParams, YES);
         const size_t numberOfArtists = p_artist_list->i_nb_items;
         NSMutableArray * const mutableArtistArray = [[NSMutableArray alloc] initWithCapacity:numberOfArtists];
-        NSMutableDictionary * const mutableArtistDict = [NSMutableDictionary dictionaryWithCapacity:numberOfArtists];
 
         for (size_t x = 0; x < numberOfArtists; x++) {
             VLCMediaLibraryArtist * const artist = [[VLCMediaLibraryArtist alloc] initWithArtist:&p_artist_list->p_items[x]];
 
             if (artist != nil) {
                 [mutableArtistArray addObject:artist];
-                [mutableArtistDict setObject:artist.name forKey:@(artist.libraryID)];
             }
         }
 
@@ -655,7 +653,6 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
 
         dispatch_async(dispatch_get_main_queue(), ^{
             self.cachedArtists = mutableArtistArray.copy;
-            self->_artistDict = mutableArtistDict.copy;
             [self performAfterCacheWritesOnQueue:self->_artistCacheModificationQueue block:^{
                 [self.changeDelegate notifyChange:VLCLibraryModelArtistListReset withObject:self];
             }];
@@ -690,19 +687,16 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
         vlc_ml_album_list_t * const p_album_list = vlc_ml_list_albums(self->_p_mediaLibrary, &queryParams);
         const size_t numberOfAlbums = p_album_list->i_nb_items;
         NSMutableArray * const mutableAlbumArray = [[NSMutableArray alloc] initWithCapacity:numberOfAlbums];
-        NSMutableDictionary * const mutableAlbumDict = [NSMutableDictionary dictionaryWithCapacity:numberOfAlbums];
 
         for (size_t x = 0; x < numberOfAlbums; x++) {
             VLCMediaLibraryAlbum * const album = [[VLCMediaLibraryAlbum alloc] initWithAlbum:&p_album_list->p_items[x]];
             [mutableAlbumArray addObject:album];
-            [mutableAlbumDict setObject:album.title forKey:@(album.libraryID)];
         }
 
         vlc_ml_album_list_release(p_album_list);
 
         dispatch_async(dispatch_get_main_queue(), ^{
             self.cachedAlbums = mutableAlbumArray.copy;
-            self->_albumDict = mutableAlbumDict.copy;
             [self performAfterCacheWritesOnQueue:self->_albumCacheModificationQueue block:^{
                 [self.changeDelegate notifyChange:VLCLibraryModelAlbumListReset withObject:self];
             }];
@@ -737,19 +731,16 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
         vlc_ml_genre_list_t * const p_genre_list = vlc_ml_list_genres(self->_p_mediaLibrary, &queryParams);
         const size_t numberOfGenres = p_genre_list->i_nb_items;
         NSMutableArray * const mutableGenreArray = [[NSMutableArray alloc] initWithCapacity:numberOfGenres];
-        NSMutableDictionary * const mutableGenreDict = [NSMutableDictionary dictionaryWithCapacity:numberOfGenres];
 
         for (size_t x = 0; x < numberOfGenres; x++) {
             VLCMediaLibraryGenre * const genre = [[VLCMediaLibraryGenre alloc] initWithGenre:&p_genre_list->p_items[x]];
             [mutableGenreArray addObject:genre];
-            [mutableGenreDict setObject:genre.name forKey:@(genre.libraryID)];
         }
 
         vlc_ml_genre_list_release(p_genre_list);
 
         dispatch_async(dispatch_get_main_queue(), ^{
             self.cachedGenres = mutableGenreArray.copy;
-            self->_genreDict = mutableGenreDict.copy;
             [self performAfterCacheWritesOnQueue:self->_genreCacheModificationQueue block:^{
                 [self.changeDelegate notifyChange:VLCLibraryModelGenreListReset withObject:self];
             }];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/42916915f0b908082369bbb4718d9bca860cb686

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/42916915f0b908082369bbb4718d9bca860cb686
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