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 @@ -419,9 +419,11 @@ public void removeWatchedStreams(final boolean removePartiallyWatched) {
419419 final PlaylistStreamEntry playlistItem = playlistIter .next ();
420420 final int indexInHistory = Collections .binarySearch (historyStreamIds ,
421421 playlistItem .getStreamId ());
422+ final StreamStateEntity streamStateEntity = streamStatesIter .next ();
423+ final long duration = playlistItem .toStreamInfoItem ().getDuration ();
422424
423- final boolean hasState = streamStatesIter . next () != null ;
424- if ( indexInHistory < 0 || hasState ) {
425+ if ( indexInHistory < 0 || ( streamStateEntity != null
426+ && ! streamStateEntity . isFinished ( duration )) ) {
425427 notWatchedItems .add (playlistItem );
426428 } else if (!thumbnailVideoRemoved
427429 && playlistManager .getPlaylistThumbnail (playlistId )
You can’t perform that action at this time.
0 commit comments