We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d5199ea + 316db0e commit bd9dcfbCopy full SHA for bd9dcfb
1 file changed
app/src/main/java/org/schabi/newpipe/player/Player.java
@@ -857,10 +857,10 @@ public void setRecovery() {
857
858
final int queuePos = playQueue.getIndex();
859
final long windowPos = simpleExoPlayer.getCurrentPosition();
860
+ final long duration = simpleExoPlayer.getDuration();
861
- if (windowPos > 0 && windowPos <= simpleExoPlayer.getDuration()) {
862
- setRecovery(queuePos, windowPos);
863
- }
+ // No checks due to https://github.com/TeamNewPipe/NewPipe/pull/7195#issuecomment-962624380
+ setRecovery(queuePos, Math.max(0, Math.min(windowPos, duration)));
864
}
865
866
private void setRecovery(final int queuePos, final long windowPos) {
0 commit comments