Browse Source

PlaybackService: Empty shuffleStack when set

Soomin Lee 5 years ago
parent
commit
e443e7c303
1 changed files with 9 additions and 0 deletions
  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;