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 <[email protected]>
- - - - -
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_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits