feat(youtube): add enable-debug-logging patch

This commit is contained in:
inotia00 2023-06-20 17:28:16 +09:00
parent 2402b01980
commit 3e252d4cb3

View File

@ -0,0 +1,38 @@
package app.revanced.patches.youtube.misc.debugging.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch
@Patch(false)
@Name("enable-debug-logging")
@Description("Adds debugging options.")
@DependsOn([SettingsPatch::class])
@YouTubeCompatibility
@Version("0.0.2")
class DebuggingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
/**
* Add settings
*/
SettingsPatch.addPreference(
arrayOf(
"SETTINGS: ENABLE_DEBUG_LOGGING"
)
)
SettingsPatch.updatePatchStatus("enable-debug-logging")
return PatchResultSuccess()
}
}