[vlc-commits] macosx/library: fix display of audio media

Felix Paul Kühne git at videolan.org
Mon May 6 11:03:30 CEST 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Mon May  6 10:26:24 2019 +0200| [6b88208f23a44e612fa44365bdd76260954756e9] | committer: Felix Paul Kühne

macosx/library: fix display of audio media

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b88208f23a44e612fa44365bdd76260954756e9
---

 modules/gui/macosx/library/VLCLibraryCollectionViewItem.m | 4 +++-
 modules/gui/macosx/library/VLCLibraryModel.m              | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/library/VLCLibraryCollectionViewItem.m b/modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
index 508fdd96c8..89fbb30959 100644
--- a/modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
+++ b/modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
@@ -144,7 +144,9 @@ NSString *VLCLibraryCellIdentifier = @"VLCLibraryCellIdentifier";
     if (_representedMediaItem.artworkGenerated) {
         image = [[NSImage alloc] initWithContentsOfURL:[NSURL URLWithString:_representedMediaItem.artworkMRL]];
     } else {
-        [_libraryController attemptToGenerateThumbnailForMediaItem:_representedMediaItem];
+        if (_representedMediaItem.mediaType != VLC_ML_MEDIA_TYPE_AUDIO) {
+            [_libraryController attemptToGenerateThumbnailForMediaItem:_representedMediaItem];
+        }
     }
     if (!image) {
         image = [NSImage imageNamed: @"noart.png"];
diff --git a/modules/gui/macosx/library/VLCLibraryModel.m b/modules/gui/macosx/library/VLCLibraryModel.m
index cd68a0b1e1..e8bac59ba4 100644
--- a/modules/gui/macosx/library/VLCLibraryModel.m
+++ b/modules/gui/macosx/library/VLCLibraryModel.m
@@ -125,7 +125,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
 
 - (size_t)numberOfAudioMedia
 {
-    if (_cachedAudioMedia) {
+    if (!_cachedAudioMedia) {
         dispatch_async(dispatch_get_main_queue(), ^{
             [self updateCachedListOfAudioMedia];
         });



More information about the vlc-commits mailing list