From 3d660e1b5eeab9771f96bd2d26a222b835e2485c Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sat, 2 Dec 2023 17:56:08 +0100 Subject: [PATCH] fix(YouTube - SponsorBlock): Allow autoplay when skipping to the end of the video --- .../app/revanced/integrations/patches/VideoInformation.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/patches/VideoInformation.java b/app/src/main/java/app/revanced/integrations/patches/VideoInformation.java index b2a42378..2b9bea41 100644 --- a/app/src/main/java/app/revanced/integrations/patches/VideoInformation.java +++ b/app/src/main/java/app/revanced/integrations/patches/VideoInformation.java @@ -135,10 +135,8 @@ public final class VideoInformation { public static boolean seekTo(final long millisecond) { final long videoLength = getVideoLength(); - // Don't seek more than the video length to prevent issues such as - // Play pause button or autoplay not working. - // TODO: These are arbitrarily chosen values and should be subject to be adjusted. - final long seekToMilliseconds = millisecond <= videoLength - 500 ? millisecond : millisecond - 100; + // Prevent issues such as play/ pause button or autoplay not working. + final long seekToMilliseconds = millisecond > videoLength ? Integer.MAX_VALUE : millisecond; ReVancedUtils.verifyOnMainThread(); try {