diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/bytecode/patch/CopyVideoUrlBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/bytecode/patch/CopyVideoUrlBytecodePatch.kt index c015612a4..ee9d281e6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/bytecode/patch/CopyVideoUrlBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/bytecode/patch/CopyVideoUrlBytecodePatch.kt @@ -12,7 +12,7 @@ import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.interaction.copyvideourl.annotation.CopyVideoUrlCompatibility import app.revanced.patches.youtube.interaction.copyvideourl.resource.patch.CopyVideoUrlResourcePatch import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch -import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch +import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch @Patch @Name("copy-video-url") diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/bytecode/patch/DownloadsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/bytecode/patch/DownloadsBytecodePatch.kt index 244dbeadf..d06629542 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/bytecode/patch/DownloadsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/bytecode/patch/DownloadsBytecodePatch.kt @@ -12,7 +12,7 @@ import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.interaction.downloads.annotation.DownloadsCompatibility import app.revanced.patches.youtube.interaction.downloads.resource.patch.DownloadsResourcePatch import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch -import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch +import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch @Patch @Name("downloads") diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt index bdd75860c..5038b85fc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt @@ -25,7 +25,7 @@ import app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints.* import app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch.ReturnYouTubeDislikeResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch -import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch +import app.revanced.patches.youtube.video.videoid.patch.VideoIdPatch import org.jf.dexlib2.builder.instruction.BuilderInstruction35c import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt index 46c60f785..ca435fdb8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt @@ -31,8 +31,8 @@ import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatParen import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch -import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch -import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch +import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch +import app.revanced.patches.youtube.video.videoid.patch.VideoIdPatch import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.* import org.jf.dexlib2.iface.instruction.formats.Instruction35c diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationPatch.kt index 1f6d84c6d..c3a30ca5e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationPatch.kt @@ -21,7 +21,7 @@ import app.revanced.patches.youtube.misc.fix.playback.fingerprints.SubtitleWindo import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch +import app.revanced.patches.youtube.video.videoid.patch.VideoIdPatch import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Name("spoof-signature-verification") diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt index 331389068..d4b1f6c1f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt @@ -137,6 +137,7 @@ class SettingsPatch : BytecodePatch( val ADS = Screen("ads", "Ads", "Ad related settings") val INTERACTIONS = Screen("interactions", "Interaction", "Settings related to interactions") val LAYOUT = Screen("layout", "Layout", "Settings related to the layout") + val VIDEO = Screen("video", "Video", "Settings related to the video player") val MISC = Screen("misc", "Misc", "Miscellaneous patches") override fun commit(screen: app.revanced.patches.shared.settings.preference.impl.PreferenceScreen) { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/VideoSpeeds.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/VideoSpeeds.kt deleted file mode 100644 index 2db31001b..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/VideoSpeeds.kt +++ /dev/null @@ -1,24 +0,0 @@ -package app.revanced.patches.youtube.misc.video.speed - -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Version -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchResult -import app.revanced.patcher.patch.PatchResultSuccess -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.youtube.misc.video.speed.custom.patch.CustomVideoSpeedPatch -import app.revanced.patches.youtube.misc.video.speed.remember.patch.RememberPlaybackSpeedPatch - -@Patch -@Name("video-speed") -@Description("Adds custom video speeds and ability to remember the playback speed you chose in the video playback speed flyout.") -@DependsOn([CustomVideoSpeedPatch::class, RememberPlaybackSpeedPatch::class]) -@Version("0.0.1") -class VideoSpeeds : BytecodePatch() { - override fun execute(context: BytecodeContext): PatchResult { - return PatchResultSuccess() // All sub patches succeeded. - } -} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/annotations/HDRBrightnessCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/annotations/HDRBrightnessCompatibility.kt similarity index 88% rename from src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/annotations/HDRBrightnessCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/annotations/HDRBrightnessCompatibility.kt index 44be49f99..4daf7beae 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/annotations/HDRBrightnessCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/annotations/HDRBrightnessCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.hdrbrightness.annotations +package app.revanced.patches.youtube.video.hdrbrightness.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt similarity index 80% rename from src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt index 979f4e8a5..0db80f880 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.hdrbrightness.fingerprints +package app.revanced.patches.youtube.video.hdrbrightness.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import org.jf.dexlib2.Opcode diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/patch/HDRBrightnessPatch.kt similarity index 89% rename from src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/patch/HDRBrightnessPatch.kt index f84efbee9..d7d237f63 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/patch/HDRBrightnessPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.hdrbrightness.patch +package app.revanced.patches.youtube.video.hdrbrightness.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -10,8 +10,8 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.youtube.misc.hdrbrightness.annotations.HDRBrightnessCompatibility -import app.revanced.patches.youtube.misc.hdrbrightness.fingerprints.HDRBrightnessFingerprint +import app.revanced.patches.youtube.video.hdrbrightness.annotations.HDRBrightnessCompatibility +import app.revanced.patches.youtube.video.hdrbrightness.fingerprints.HDRBrightnessFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -30,7 +30,7 @@ class HDRBrightnessPatch : BytecodePatch( listOf(HDRBrightnessFingerprint) ) { override fun execute(context: BytecodeContext): PatchResult { - SettingsPatch.PreferenceScreen.MISC.addPreferences( + SettingsPatch.PreferenceScreen.VIDEO.addPreferences( SwitchPreference( "revanced_pref_hdr_autobrightness", StringResource("revanced_hdr_autobrightness_enabled_title", "Enable auto HDR brightness"), diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/annotation/VideoInformationCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/annotation/VideoInformationCompatibility.kt similarity index 80% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/annotation/VideoInformationCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/annotation/VideoInformationCompatibility.kt index 6e7f87614..f6dcb9c39 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/annotation/VideoInformationCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/annotation/VideoInformationCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.annotation +package app.revanced.patches.youtube.video.information.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/CreateVideoPlayerSeekbarFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/CreateVideoPlayerSeekbarFingerprint.kt similarity index 72% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/CreateVideoPlayerSeekbarFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/CreateVideoPlayerSeekbarFingerprint.kt index 13f82a926..5bfa9579d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/CreateVideoPlayerSeekbarFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/CreateVideoPlayerSeekbarFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.fingerprints +package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt similarity index 83% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt index 648f1a7e3..8c7445009 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.fingerprints +package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import org.jf.dexlib2.Opcode diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt similarity index 81% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt index fe0355d68..628421a01 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.fingerprints +package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/PlayerInitFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerInitFingerprint.kt similarity index 75% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/PlayerInitFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerInitFingerprint.kt index 7e6485525..d772935b5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/PlayerInitFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerInitFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.fingerprints +package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/SeekFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/SeekFingerprint.kt similarity index 70% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/SeekFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/SeekFingerprint.kt index 8f2ba9663..c6d9b2879 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/SeekFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/SeekFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.fingerprints +package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/VideoLengthFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoLengthFingerprint.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/VideoLengthFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoLengthFingerprint.kt index 2d9e98682..89d4d16c6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/VideoLengthFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoLengthFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.fingerprints +package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/VideoTimeFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoTimeFingerprint.kt similarity index 72% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/VideoTimeFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoTimeFingerprint.kt index d04b75377..c09c69ab9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/fingerprints/VideoTimeFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoTimeFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.fingerprints +package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/patch/VideoInformationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/patch/VideoInformationPatch.kt similarity index 96% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/information/patch/VideoInformationPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/information/patch/VideoInformationPatch.kt index 29ea06744..e73f0d246 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/information/patch/VideoInformationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/patch/VideoInformationPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.information.patch +package app.revanced.patches.youtube.video.information.patch import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description @@ -19,10 +19,10 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.youtube.misc.video.information.annotation.VideoInformationCompatibility -import app.revanced.patches.youtube.misc.video.information.fingerprints.* -import app.revanced.patches.youtube.misc.video.speed.remember.patch.RememberPlaybackSpeedPatch -import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch +import app.revanced.patches.youtube.video.information.annotation.VideoInformationCompatibility +import app.revanced.patches.youtube.video.information.fingerprints.* +import app.revanced.patches.youtube.video.speed.remember.patch.RememberPlaybackSpeedPatch +import app.revanced.patches.youtube.video.videoid.patch.VideoIdPatch import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcode import org.jf.dexlib2.builder.BuilderInstruction diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt similarity index 88% rename from src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt index 542e4b32f..4f77ee016 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/annotations/OldQualityLayoutCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.oldqualitylayout.annotations +package app.revanced.patches.youtube.video.oldqualitylayout.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt similarity index 92% rename from src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt index 4abb688e9..61b085895 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/fingerprints/QualityMenuViewInflateFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.oldqualitylayout.fingerprints +package app.revanced.patches.youtube.video.oldqualitylayout.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/patch/OldQualityLayoutPatch.kt similarity index 89% rename from src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/patch/OldQualityLayoutPatch.kt index dd4597b01..426a26da3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/oldqualitylayout/patch/OldQualityLayoutPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.oldqualitylayout.patch +package app.revanced.patches.youtube.video.oldqualitylayout.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -10,12 +10,12 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.youtube.layout.oldqualitylayout.annotations.OldQualityLayoutCompatibility -import app.revanced.patches.youtube.layout.oldqualitylayout.fingerprints.QualityMenuViewInflateFingerprint -import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference +import app.revanced.patches.youtube.video.oldqualitylayout.annotations.OldQualityLayoutCompatibility +import app.revanced.patches.youtube.video.oldqualitylayout.fingerprints.QualityMenuViewInflateFingerprint +import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch +import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction @Patch @@ -30,7 +30,7 @@ class OldQualityLayoutPatch : BytecodePatch( listOf(QualityMenuViewInflateFingerprint) ) { override fun execute(context: BytecodeContext): PatchResult { - SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( + SettingsPatch.PreferenceScreen.VIDEO.addPreferences( SwitchPreference( "revanced_use_old_style_quality_settings", StringResource("revanced_old_style_quality_settings_enabled_title", "Use old video quality player menu"), diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/annotations/RememberVideoQualityCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/annotations/RememberVideoQualityCompatibility.kt similarity index 81% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/annotations/RememberVideoQualityCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/quality/annotations/RememberVideoQualityCompatibility.kt index 7e871ff60..56aaa61f7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/annotations/RememberVideoQualityCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/annotations/RememberVideoQualityCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.quality.annotations +package app.revanced.patches.youtube.video.quality.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt similarity index 83% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt index 896b5de3e..d69bb8406 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.quality.fingerprints +package app.revanced.patches.youtube.video.quality.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import org.jf.dexlib2.Opcode diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/VideoQualityItemOnClickParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualityItemOnClickParentFingerprint.kt similarity index 76% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/VideoQualityItemOnClickParentFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualityItemOnClickParentFingerprint.kt index 592c62fc0..a9e590671 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/VideoQualityItemOnClickParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualityItemOnClickParentFingerprint.kt @@ -1,5 +1,5 @@ -package app.revanced.patches.youtube.misc.video.quality.fingerprints +package app.revanced.patches.youtube.video.quality.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/VideoQualitySetterFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualitySetterFingerprint.kt similarity index 88% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/VideoQualitySetterFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualitySetterFingerprint.kt index 9a29d162b..ab95b0b5b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/fingerprints/VideoQualitySetterFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualitySetterFingerprint.kt @@ -1,5 +1,5 @@ -package app.revanced.patches.youtube.misc.video.quality.fingerprints +package app.revanced.patches.youtube.video.quality.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/patch/RememberVideoQualityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/RememberVideoQualityPatch.kt similarity index 92% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/patch/RememberVideoQualityPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/RememberVideoQualityPatch.kt index f3e98ba08..4f23e6492 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/quality/patch/RememberVideoQualityPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/RememberVideoQualityPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.quality.patch +package app.revanced.patches.youtube.video.quality.patch import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description @@ -20,11 +20,11 @@ import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch -import app.revanced.patches.youtube.misc.video.quality.annotations.RememberVideoQualityCompatibility -import app.revanced.patches.youtube.misc.video.quality.fingerprints.SetQualityByIndexMethodClassFieldReferenceFingerprint -import app.revanced.patches.youtube.misc.video.quality.fingerprints.VideoQualityItemOnClickParentFingerprint -import app.revanced.patches.youtube.misc.video.quality.fingerprints.VideoQualitySetterFingerprint +import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch +import app.revanced.patches.youtube.video.quality.annotations.RememberVideoQualityCompatibility +import app.revanced.patches.youtube.video.quality.fingerprints.SetQualityByIndexMethodClassFieldReferenceFingerprint +import app.revanced.patches.youtube.video.quality.fingerprints.VideoQualityItemOnClickParentFingerprint +import app.revanced.patches.youtube.video.quality.fingerprints.VideoQualitySetterFingerprint import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.reference.FieldReference @@ -41,25 +41,6 @@ class RememberVideoQualityPatch : BytecodePatch( ) ) { override fun execute(context: BytecodeContext): PatchResult { - SettingsPatch.PreferenceScreen.MISC.addPreferences( - SwitchPreference( - "revanced_remember_video_quality_last_selected", - StringResource( - "revanced_remember_video_quality_last_selected_title", - "Remember video quality changes" - ), - true, - StringResource( - "revanced_remember_video_quality_last_selected_summary_on", - "Quality changes apply to all videos" - ), - StringResource( - "revanced_remember_video_quality_last_selected_summary_off", - "Quality changes only apply to the current video" - ) - ) - ) - // This is bloated as each value has it's own String key/value // ideally the entries would be raw values (and not a key to a String resource) val entries = listOf( @@ -84,7 +65,24 @@ class RememberVideoQualityPatch : BytecodePatch( StringResource("revanced_default_quality_entry_value_8", "280"), StringResource("revanced_default_quality_entry_value_9", "144"), ) - SettingsPatch.PreferenceScreen.MISC.addPreferences( + + SettingsPatch.PreferenceScreen.VIDEO.addPreferences( + SwitchPreference( + "revanced_remember_video_quality_last_selected", + StringResource( + "revanced_remember_video_quality_last_selected_title", + "Remember video quality changes" + ), + false, + StringResource( + "revanced_remember_video_quality_last_selected_summary_on", + "Quality changes apply to all videos" + ), + StringResource( + "revanced_remember_video_quality_last_selected_summary_off", + "Quality changes only apply to the current video" + ) + ), ListPreference( "revanced_default_video_quality_wifi", StringResource( diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/VideoSpeeds.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/VideoSpeeds.kt new file mode 100644 index 000000000..e69de29bb diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt similarity index 88% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt index eae4e1c02..520d10c48 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/annotations/CustomPlaybackSpeedCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.speed.custom.annotations +package app.revanced.patches.youtube.video.speed.custom.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt similarity index 89% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt index e4e336880..4d624dab2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.speed.custom.fingerprints +package app.revanced.patches.youtube.video.speed.custom.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt index 4cb98cd4d..30c315de8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.speed.custom.fingerprints +package app.revanced.patches.youtube.video.speed.custom.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/VideoSpeedPatchFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/VideoSpeedPatchFingerprint.kt new file mode 100644 index 000000000..e69de29bb diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/patch/CustomVideoSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/patch/CustomVideoSpeedPatch.kt similarity index 93% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/patch/CustomVideoSpeedPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/patch/CustomVideoSpeedPatch.kt index 72585066b..58f42412b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/custom/patch/CustomVideoSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/patch/CustomVideoSpeedPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.speed.custom.patch +package app.revanced.patches.youtube.video.speed.custom.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -13,9 +13,9 @@ import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.TextPreference import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import app.revanced.patches.youtube.misc.video.speed.custom.annotations.CustomPlaybackSpeedCompatibility -import app.revanced.patches.youtube.misc.video.speed.custom.fingerprints.SpeedArrayGeneratorFingerprint -import app.revanced.patches.youtube.misc.video.speed.custom.fingerprints.SpeedLimiterFingerprint +import app.revanced.patches.youtube.video.speed.custom.annotations.CustomPlaybackSpeedCompatibility +import app.revanced.patches.youtube.video.speed.custom.fingerprints.SpeedArrayGeneratorFingerprint +import app.revanced.patches.youtube.video.speed.custom.fingerprints.SpeedLimiterFingerprint import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt similarity index 80% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt index 9fb318f77..5a6c1bfc6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/annotation/RememberPlaybackSpeedCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.speed.remember.annotation +package app.revanced.patches.youtube.video.speed.remember.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/fingerprint/InitializePlaybackSpeedValuesFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/fingerprint/InitializePlaybackSpeedValuesFingerprint.kt similarity index 75% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/fingerprint/InitializePlaybackSpeedValuesFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/fingerprint/InitializePlaybackSpeedValuesFingerprint.kt index e244a298e..31ac21e8a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/fingerprint/InitializePlaybackSpeedValuesFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/fingerprint/InitializePlaybackSpeedValuesFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.speed.remember.fingerprint +package app.revanced.patches.youtube.video.speed.remember.fingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt similarity index 88% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt index b135b9f50..dab6f961e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.speed.remember.patch +package app.revanced.patches.youtube.video.speed.remember.patch import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description @@ -19,11 +19,11 @@ import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch -import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch.Companion.reference -import app.revanced.patches.youtube.misc.video.speed.custom.patch.CustomVideoSpeedPatch -import app.revanced.patches.youtube.misc.video.speed.remember.annotation.RememberPlaybackSpeedCompatibility -import app.revanced.patches.youtube.misc.video.speed.remember.fingerprint.InitializePlaybackSpeedValuesFingerprint +import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch +import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch.Companion.reference +import app.revanced.patches.youtube.video.speed.custom.patch.CustomVideoSpeedPatch +import app.revanced.patches.youtube.video.speed.remember.annotation.RememberPlaybackSpeedCompatibility +import app.revanced.patches.youtube.video.speed.remember.fingerprint.InitializePlaybackSpeedValuesFingerprint @Name("remember-playback-speed") @Description("Adds the ability to remember the playback speed you chose in the video playback speed flyout.") @@ -36,7 +36,7 @@ class RememberPlaybackSpeedPatch : BytecodePatch( ) ) { override fun execute(context: BytecodeContext): PatchResult { - SettingsPatch.PreferenceScreen.MISC.addPreferences( + SettingsPatch.PreferenceScreen.VIDEO.addPreferences( SwitchPreference( "revanced_remember_playback_speed_last_selected", StringResource( @@ -52,10 +52,7 @@ class RememberPlaybackSpeedPatch : BytecodePatch( "revanced_remember_playback_speed_last_selected_summary_off", "Playback speed changes only apply to the current video" ) - ) - ) - - SettingsPatch.PreferenceScreen.MISC.addPreferences( + ), ListPreference( "revanced_default_playback_speed", StringResource( @@ -122,4 +119,4 @@ class RememberPlaybackSpeedPatch : BytecodePatch( const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/playback/speed/RememberPlaybackSpeedPatch;" } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/annotation/VideoIdCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/annotation/VideoIdCompatibility.kt similarity index 88% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/annotation/VideoIdCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/videoid/annotation/VideoIdCompatibility.kt index 63111f104..a9c46f5bf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/annotation/VideoIdCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/annotation/VideoIdCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.videoid.annotation +package app.revanced.patches.youtube.video.videoid.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/fingerprint/VideoIdFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprint.kt similarity index 93% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/fingerprint/VideoIdFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprint.kt index bed9e90d3..fce1cf0c9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/fingerprint/VideoIdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.videoid.fingerprint +package app.revanced.patches.youtube.video.videoid.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt similarity index 88% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt index 44c14a2c2..8e249ae76 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.videoid.fingerprint +package app.revanced.patches.youtube.video.videoid.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/patch/VideoIdPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/patch/VideoIdPatch.kt similarity index 92% rename from src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/patch/VideoIdPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/video/videoid/patch/VideoIdPatch.kt index fab14d7f8..4b8fbcc47 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/video/videoid/patch/VideoIdPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/patch/VideoIdPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.misc.video.videoid.patch +package app.revanced.patches.youtube.video.videoid.patch import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description @@ -13,9 +13,9 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.youtube.misc.video.videoid.annotation.VideoIdCompatibility -import app.revanced.patches.youtube.misc.video.videoid.fingerprint.VideoIdFingerprint -import app.revanced.patches.youtube.misc.video.videoid.fingerprint.VideoIdFingerprintBackgroundPlay +import app.revanced.patches.youtube.video.videoid.annotation.VideoIdCompatibility +import app.revanced.patches.youtube.video.videoid.fingerprint.VideoIdFingerprint +import app.revanced.patches.youtube.video.videoid.fingerprint.VideoIdFingerprintBackgroundPlay import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Name("video-id-hook")