Commit 9665512b authored by Felix Paul Kühne's avatar Felix Paul Kühne

VPC: correctly move on to the next item if playback is over

parent ce242905
......@@ -5,6 +5,7 @@
* Added support for SMB file sharing (#8879)
* Added support for music albums with more than 1 disk (#14650)
* Re-wrote Apple Watch extension for watchOS 2
* Media stored in folders on remote servers is now played as a list
* Reworked networking UI
* Added support for system-wide search "CoreSpotlight"
* Added improved UI support for Right-to-Left languages
......
......@@ -567,12 +567,19 @@ NSString *const VLCPlaybackControllerPlaybackDidFail = @"VLCPlaybackControllerPl
[_mediaPlayer performSelector:@selector(setTextRendererFontSize:) withObject:[[NSUserDefaults standardUserDefaults] objectForKey:kVLCSettingSubtitlesFontSize]];
[_mediaPlayer performSelector:@selector(setTextRendererFontColor:) withObject:[[NSUserDefaults standardUserDefaults] objectForKey:kVLCSettingSubtitlesFontColor]];
} else if (currentState == VLCMediaPlayerStateError) {
APLog(@"Playback failed");
_playbackFailed = YES;
[self stopPlayback];
} else if ((currentState == VLCMediaPlayerStateEnded || currentState == VLCMediaPlayerStateStopped) && _listPlayer.repeatMode == VLCDoNotRepeat) {
if ([_listPlayer.mediaList indexOfMedia:_mediaPlayer.media] == _listPlayer.mediaList.count - 1) {
[_listPlayer.mediaList lock];
NSUInteger listCount = _listPlayer.mediaList.count;
if ([_listPlayer.mediaList indexOfMedia:_mediaPlayer.media] == listCount - 1) {
[_listPlayer.mediaList unlock];
[self stopPlayback];
return;
} else if (listCount > 1) {
[_listPlayer.mediaList unlock];
[_listPlayer next];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment