diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 2938fe0b5..9ace11a46 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -394,12 +394,14 @@ public class LocalPlaylistFragment extends BaseLocalListFragment historyList.stream().map(StreamHistoryEntry::getStreamId) .collect(Collectors.toList())); - final var streamsFlowable = playlistManager.getPlaylistStreams(playlistId) - .zipWith(historyIdsFlowable, (playlist, historyStreamIds) -> { + final var streamsMaybe = playlistManager.getPlaylistStreams(playlistId) + .firstElement() + .zipWith(historyIdsMaybe, (playlist, historyStreamIds) -> { // Remove Watched, Functionality data final List notWatchedItems = new ArrayList<>(); boolean thumbnailVideoRemoved = false; @@ -418,8 +420,8 @@ public class LocalPlaylistFragment extends BaseLocalListFragment(notWatchedItems, thumbnailVideoRemoved); }); - disposables.add(streamsFlowable.subscribeOn(Schedulers.io()) + + disposables.add(streamsMaybe.subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(flow -> { final List notWatchedItems = flow.first;