mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-04 00:24:34 +02:00
fix(YouTube/Return YouTube Dislike): dislike counts not visible in incognito mode
This commit is contained in:
parent
e5c180ba84
commit
06358a58e8
@ -16,6 +16,7 @@ import app.revanced.patches.youtube.utils.returnyoutubedislike.general.fingerpri
|
||||
import app.revanced.patches.youtube.utils.returnyoutubedislike.rollingnumber.ReturnYouTubeDislikeRollingNumberPatch
|
||||
import app.revanced.patches.youtube.utils.returnyoutubedislike.shorts.ReturnYouTubeDislikeShortsPatch
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
||||
import app.revanced.patches.youtube.video.videoid.VideoIdPatch
|
||||
import app.revanced.util.getTargetIndexWithFieldReferenceType
|
||||
import app.revanced.util.patch.BaseBytecodePatch
|
||||
@ -32,7 +33,7 @@ object ReturnYouTubeDislikePatch : BaseBytecodePatch(
|
||||
ReturnYouTubeDislikeRollingNumberPatch::class,
|
||||
ReturnYouTubeDislikeShortsPatch::class,
|
||||
SettingsPatch::class,
|
||||
VideoIdPatch::class
|
||||
VideoInformationPatch::class
|
||||
),
|
||||
compatiblePackages = COMPATIBLE_PACKAGE,
|
||||
fingerprints = setOf(
|
||||
@ -101,6 +102,7 @@ object ReturnYouTubeDislikePatch : BaseBytecodePatch(
|
||||
if (SettingsPatch.upward1834) {
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
VideoIdPatch.hookPlayerResponseVideoId("$FILTER_CLASS_DESCRIPTOR->newPlayerResponseVideoId(Ljava/lang/String;Z)V")
|
||||
VideoInformationPatch.hookShorts("$FILTER_CLASS_DESCRIPTOR->newShortsVideoStarted(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JZ)V")
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
@ -1,7 +1,6 @@
|
||||
package app.revanced.patches.youtube.utils.returnyoutubedislike.shorts
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
@ -10,7 +9,6 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.UTILS_PATH
|
||||
import app.revanced.patches.youtube.utils.returnyoutubedislike.shorts.fingerprints.IncognitoFingerprint
|
||||
import app.revanced.patches.youtube.utils.returnyoutubedislike.shorts.fingerprints.ShortsTextViewFingerprint
|
||||
import app.revanced.patches.youtube.utils.returnyoutubedislike.shorts.fingerprints.TextComponentSpecFingerprint
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
@ -26,7 +24,6 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
@Patch(dependencies = [SettingsPatch::class])
|
||||
object ReturnYouTubeDislikeShortsPatch : BytecodePatch(
|
||||
setOf(
|
||||
IncognitoFingerprint,
|
||||
ShortsTextViewFingerprint,
|
||||
TextComponentSpecFingerprint
|
||||
)
|
||||
@ -94,15 +91,6 @@ object ReturnYouTubeDislikeShortsPatch : BytecodePatch(
|
||||
removeInstruction(insertIndex)
|
||||
}
|
||||
}
|
||||
|
||||
IncognitoFingerprint.resultOrThrow().let {
|
||||
it.mutableMethod.apply {
|
||||
addInstruction(
|
||||
1,
|
||||
"sput-boolean p4, $INTEGRATIONS_RYD_CLASS_DESCRIPTOR->isIncognito:Z"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
package app.revanced.patches.youtube.utils.returnyoutubedislike.shorts.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal object IncognitoFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("${'$'}AutoValue_AccountIdentity;") }
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user