Skip to content

Commit

Permalink
Merge pull request #8259 from LingYinTianMeng/dev
Browse files Browse the repository at this point in the history
Fix removing only fully watched videos from playlist
  • Loading branch information
Stypox authored May 5, 2022
2 parents 8f34f69 + 59d8c57 commit a1435bd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,11 @@ public void removeWatchedStreams(final boolean removePartiallyWatched) {
final PlaylistStreamEntry playlistItem = playlistIter.next();
final int indexInHistory = Collections.binarySearch(historyStreamIds,
playlistItem.getStreamId());
final StreamStateEntity streamStateEntity = streamStatesIter.next();
final long duration = playlistItem.toStreamInfoItem().getDuration();

final boolean hasState = streamStatesIter.next() != null;
if (indexInHistory < 0 || hasState) {
if (indexInHistory < 0 || (streamStateEntity != null
&& !streamStateEntity.isFinished(duration))) {
notWatchedItems.add(playlistItem);
} else if (!thumbnailVideoRemoved
&& playlistManager.getPlaylistThumbnail(playlistId)
Expand Down

0 comments on commit a1435bd

Please sign in to comment.