mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-29 21:30:19 +02:00
fix(YouTube/Enable song search): indicates the supported version when a patch exception occurs
This commit is contained in:
parent
22645ce855
commit
91b6d1fed6
@ -3,12 +3,12 @@ package app.revanced.patches.youtube.general.songsearch
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.youtube.general.songsearch.fingerprints.VoiceSearchConfigFingerprint
|
import app.revanced.patches.youtube.general.songsearch.fingerprints.VoiceSearchConfigFingerprint
|
||||||
import app.revanced.patches.youtube.utils.integrations.Constants.GENERAL
|
import app.revanced.patches.youtube.utils.integrations.Constants.GENERAL
|
||||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||||
import app.revanced.util.exception
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Enable song search",
|
name = "Enable song search",
|
||||||
@ -55,7 +55,7 @@ object SongSearchPatch : BytecodePatch(
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} ?: throw VoiceSearchConfigFingerprint.exception
|
} ?: throw PatchException("This version is not supported. Please use YouTube 18.30.37 or later.")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add settings
|
* Add settings
|
||||||
|
@ -2,6 +2,9 @@ package app.revanced.patches.youtube.general.songsearch.fingerprints
|
|||||||
|
|
||||||
import app.revanced.util.fingerprint.LiteralValueFingerprint
|
import app.revanced.util.fingerprint.LiteralValueFingerprint
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This fingerprint is compatible with YouTube v18.30.37+
|
||||||
|
*/
|
||||||
object VoiceSearchConfigFingerprint : LiteralValueFingerprint(
|
object VoiceSearchConfigFingerprint : LiteralValueFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
literalSupplier = { 45417109 }
|
literalSupplier = { 45417109 }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user