Sfoglia il codice sorgente

PlaybackService: Empty shuffleStack when set

Soomin Lee 5 anni fa
parent
commit
e443e7c303
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  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;