mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 00:20:32 +00:00
Merge pull request #8259 from LingYinTianMeng/dev
Fix removing only fully watched videos from playlist
This commit is contained in:
commit
a1435bd566
@ -419,9 +419,11 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
|||||||
final PlaylistStreamEntry playlistItem = playlistIter.next();
|
final PlaylistStreamEntry playlistItem = playlistIter.next();
|
||||||
final int indexInHistory = Collections.binarySearch(historyStreamIds,
|
final int indexInHistory = Collections.binarySearch(historyStreamIds,
|
||||||
playlistItem.getStreamId());
|
playlistItem.getStreamId());
|
||||||
|
final StreamStateEntity streamStateEntity = streamStatesIter.next();
|
||||||
|
final long duration = playlistItem.toStreamInfoItem().getDuration();
|
||||||
|
|
||||||
final boolean hasState = streamStatesIter.next() != null;
|
if (indexInHistory < 0 || (streamStateEntity != null
|
||||||
if (indexInHistory < 0 || hasState) {
|
&& !streamStateEntity.isFinished(duration))) {
|
||||||
notWatchedItems.add(playlistItem);
|
notWatchedItems.add(playlistItem);
|
||||||
} else if (!thumbnailVideoRemoved
|
} else if (!thumbnailVideoRemoved
|
||||||
&& playlistManager.getPlaylistThumbnail(playlistId)
|
&& playlistManager.getPlaylistThumbnail(playlistId)
|
||||||
|
Loading…
Reference in New Issue
Block a user