Explorar o código

PlaybackService: Empty shuffleStack when set

Soomin Lee %!s(int64=5) %!d(string=hai) anos
pai
achega
e443e7c303
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      Sources/VLCPlaybackService.m

+ 9 - 0
Sources/VLCPlaybackService.m

@@ -707,6 +707,15 @@ NSString *const VLCPlaybackServicePlaybackPositionUpdated = @"VLCPlaybackService
     [[NSNotificationCenter defaultCenter] postNotificationName:VLCPlaybackServicePlaybackDidPause object:self];
 }
 
+- (void)setShuffleMode:(BOOL)shuffleMode
+{
+    _shuffleMode = shuffleMode;
+
+    if (_shuffleMode) {
+        [_shuffleStack removeAllObjects];
+    }
+}
+
 - (void)next
 {
     NSInteger mediaListCount = _mediaList.count;