kopia lustrzana https://github.com/TeamNewPipe/NewPipe
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.pull/6712/head
rodzic
4a2bd7bd7b
commit
fa8630ddae
|
@ -813,7 +813,7 @@ public final class VideoDetailFragment
|
||||||
@NonNull final String newTitle,
|
@NonNull final String newTitle,
|
||||||
@Nullable final PlayQueue newQueue) {
|
@Nullable final PlayQueue newQueue) {
|
||||||
if (isPlayerAvailable() && newQueue != null && playQueue != null
|
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.
|
// Preloading can be disabled since playback is surely being replaced.
|
||||||
player.disablePreloadingOfCurrentTrack();
|
player.disablePreloadingOfCurrentTrack();
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue