Skip to content

Commit

Permalink
fix(youtube/overlay-buttons): Disable playlist autoplay loops video…
Browse files Browse the repository at this point in the history
… in minimized and PiP mode
  • Loading branch information
inotia00 committed Jul 23, 2023
1 parent 8a748e9 commit 59edd59
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.youtube.overlaybutton.alwaysrepeat.fingerprints.AutoNavInformerFingerprint
import app.revanced.patches.youtube.overlaybutton.alwaysrepeat.fingerprints.VideoEndFingerprint
import app.revanced.patches.youtube.overlaybutton.alwaysrepeat.fingerprints.VideoEndParentFingerprint
import app.revanced.patches.youtube.utils.fingerprints.PlayerPatchFingerprint
import app.revanced.util.integrations.Constants.INTEGRATIONS_PATH
import app.revanced.util.integrations.Constants.UTILS_PATH
import app.revanced.util.integrations.Constants.VIDEO_PATH
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction

class AlwaysRepeatPatch : BytecodePatch(
listOf(
AutoNavInformerFingerprint,
PlayerPatchFingerprint,
VideoEndParentFingerprint
)
) {
Expand All @@ -35,7 +32,6 @@ class AlwaysRepeatPatch : BytecodePatch(
it.mutableMethod.apply {
addInstructionsWithLabels(
0, """
invoke-static {}, $UTILS_PATH/AlwaysRepeatPatch;->shouldRepeatAndPause()V
invoke-static {}, $VIDEO_PATH/VideoInformation;->shouldAlwaysRepeat()Z
move-result v0
if-eqz v0, :end
Expand All @@ -46,13 +42,6 @@ class AlwaysRepeatPatch : BytecodePatch(
} ?: return VideoEndFingerprint.toErrorResult()
} ?: return VideoEndParentFingerprint.toErrorResult()

PlayerPatchFingerprint.result?.mutableMethod?.addInstruction(
0,
"invoke-static {p0}, " +
"$INTEGRATIONS_PATH/utils/ResourceHelper;->" +
"setPlayPauseButton(Landroid/view/View;)V"
) ?: return PlayerPatchFingerprint.toErrorResult()

AutoNavInformerFingerprint.result?.let {
with(
context
Expand Down

0 comments on commit 59edd59

Please sign in to comment.