mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 11:02:35 +01:00
Use url comparison between queue items when disabling preloading
From #4562: Disable player stream preloading only if the current stream is going to be replaced for sure (see this). equals() was implemented for PlayQueueItems, so that (only) the url is compared when checking them.
This commit is contained in:
parent
4a2bd7bd7b
commit
fa8630ddae
@ -813,7 +813,7 @@ public final class VideoDetailFragment
|
||||
@NonNull final String newTitle,
|
||||
@Nullable final PlayQueue newQueue) {
|
||||
if (isPlayerAvailable() && newQueue != null && playQueue != null
|
||||
&& !Objects.equals(newQueue.getItem(), playQueue.getItem())) {
|
||||
&& playQueue.getItem() != null && !playQueue.getItem().getUrl().equals(newUrl)) {
|
||||
// Preloading can be disabled since playback is surely being replaced.
|
||||
player.disablePreloadingOfCurrentTrack();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user