File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/local/playlist Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,12 +414,14 @@ public void removeWatchedStreams(final boolean removePartiallyWatched) {
414414 } else {
415415 final Iterator <StreamStateEntity > streamStatesIter = recordManager
416416 .loadLocalStreamStateBatch (playlist ).blockingGet ().iterator ();
417+
417418 while (playlistIter .hasNext ()) {
418419 final PlaylistStreamEntry playlistItem = playlistIter .next ();
419420 final int indexInHistory = Collections .binarySearch (historyStreamIds ,
420421 playlistItem .getStreamId ());
421422 final StreamStateEntity streamStateEntity = streamStatesIter .next ();
422423 final long duration = playlistItem .toStreamInfoItem ().getDuration ();
424+
423425 if (indexInHistory < 0 || (streamStateEntity != null
424426 && !streamStateEntity .isFinished (duration ))) {
425427 notWatchedItems .add (playlistItem );
You can’t perform that action at this time.
0 commit comments