Commit ce54abc6 authored by Tobias's avatar Tobias Committed by Felix Paul Kühne
Browse files

enable remote skip commands and use jump for forward/backward buttons when...

enable remote skip commands and use jump for forward/backward buttons when medialist contains only one item

(cherry picked from commit b34c1882

)
Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent f06bd2e2
......@@ -618,7 +618,7 @@ NSString *const VLCPlaybackControllerPlaybackDidFail = @"VLCPlaybackControllerPl
- (void)forward
{
if (_mediaList) {
if (_mediaList.count > 1) {
[_listPlayer next];
[[NSNotificationCenter defaultCenter] postNotificationName:VLCPlaybackControllerPlaybackMetadataDidChange object:self];
} else {
......@@ -629,7 +629,7 @@ NSString *const VLCPlaybackControllerPlaybackDidFail = @"VLCPlaybackControllerPl
- (void)backward
{
if (_mediaList) {
if (_mediaList.count > 1) {
[_listPlayer previous];
[[NSNotificationCenter defaultCenter] postNotificationName:VLCPlaybackControllerPlaybackMetadataDidChange object:self];
}
......@@ -1034,7 +1034,7 @@ static inline NSArray * RemoteCommandCenterCommandsToHandle(MPRemoteCommandCente
* or next/previousTrack buttons but prefers skip buttons,
* we only enable skip buttons if we have a no medialist
*/
BOOL enableSkip = [VLCPlaybackController sharedInstance].mediaList == nil;
BOOL enableSkip = [VLCPlaybackController sharedInstance].mediaList.count <= 1;
commandCenter.skipForwardCommand.enabled = enableSkip;
commandCenter.skipBackwardCommand.enabled = enableSkip;
......
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