[vlc-commits] [Git][videolan/vlc][master] macosx: Fix playing artist and genres by clicking on VLCLibraryTableCellView

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Mon Feb 6 23:13:21 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
bec23231 by Claudio Cambra at 2023-02-06T22:24:45+00:00
macosx: Fix playing artist and genres by clicking on VLCLibraryTableCellView

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

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryTableCellView.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryTableCellView.m
=====================================
@@ -130,7 +130,18 @@
 
 - (void)playMediaItemInstantly:(id)sender
 {
-    [[[VLCMain sharedInstance] libraryController] appendItemToPlaylist:_representedItem playImmediately:YES];
+    VLCLibraryController *libraryController = VLCMain.sharedInstance.libraryController;
+
+    // We want to add all the tracks to the playlist but only play the first one immediately,
+    // otherwise we will skip straight to the last track of the last album from the artist
+    __block BOOL playImmediately = YES;
+    [_representedItem iterateMediaItemsWithBlock:^(VLCMediaLibraryMediaItem* mediaItem) {
+        [libraryController appendItemToPlaylist:mediaItem playImmediately:playImmediately];
+
+        if(playImmediately) {
+            playImmediately = NO;
+        }
+    }];
 }
 
 - (void)playInputItemInstantly:(id)sender



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

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