From 55c577e76ec96fad3a52279eaea2201f8f05c2a7 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Wed, 25 Mar 2020 22:34:02 +0100 Subject: [PATCH] Seek duration should not be rounded up when opening the settings, even if inexact seek is disabled --- .../org/schabi/newpipe/settings/VideoAudioSettingsFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/VideoAudioSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/VideoAudioSettingsFragment.java index 9d1c37147..383cf7f74 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/VideoAudioSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/VideoAudioSettingsFragment.java @@ -88,7 +88,7 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment { durations.setEntryValues(displayedDurationValues.toArray(new CharSequence[0])); durations.setEntries(displayedDescriptionValues.toArray(new CharSequence[0])); final int selectedDuration = Integer.parseInt(durations.getValue()); - if (selectedDuration / (int) DateUtils.SECOND_IN_MILLIS % 10 == 5) { + if (inexactSeek && selectedDuration / (int) DateUtils.SECOND_IN_MILLIS % 10 == 5) { final int newDuration = selectedDuration / (int) DateUtils.SECOND_IN_MILLIS + 5; durations.setValue(Integer.toString(newDuration * (int) DateUtils.SECOND_IN_MILLIS));