Parcourir la source

PlaybackService: Empty shuffleStack when set

Soomin Lee il y a 5 ans
Parent
commit
e443e7c303
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  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;