mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-29 13:20:19 +02:00
fix(YouTube - Video playback): Applying default video quality to Shorts causes the beginning of the shorts to get stuck in a loop
This commit is contained in:
parent
20eaad51d8
commit
e5cc1dd5b5
@ -1,12 +1,19 @@
|
|||||||
package app.revanced.patches.youtube.utils.fix.shortsplayback
|
package app.revanced.patches.youtube.utils.fix.shortsplayback
|
||||||
|
|
||||||
import app.revanced.util.fingerprint.legacyFingerprint
|
import app.revanced.util.fingerprint.legacyFingerprint
|
||||||
import app.revanced.util.or
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
|
|
||||||
internal val shortsPlaybackFingerprint = legacyFingerprint(
|
internal const val SHORTS_PLAYBACK_PRIMARY_FEATURE_FLAG = 45387052L
|
||||||
name = "shortsPlaybackFingerprint",
|
|
||||||
|
internal val shortsPlaybackPrimaryFingerprint = legacyFingerprint(
|
||||||
|
name = "shortsPlaybackPrimaryFingerprint",
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
literals = listOf(SHORTS_PLAYBACK_PRIMARY_FEATURE_FLAG),
|
||||||
literals = listOf(45387052L),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
internal const val SHORTS_PLAYBACK_SECONDARY_FEATURE_FLAG = 45378771L
|
||||||
|
|
||||||
|
internal val shortsPlaybackSecondaryFingerprint = legacyFingerprint(
|
||||||
|
name = "shortsPlaybackSecondaryFingerprint",
|
||||||
|
returnType = "L",
|
||||||
|
literals = listOf(SHORTS_PLAYBACK_SECONDARY_FEATURE_FLAG),
|
||||||
|
)
|
@ -2,7 +2,6 @@ package app.revanced.patches.youtube.utils.fix.shortsplayback
|
|||||||
|
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.util.fingerprint.injectLiteralInstructionBooleanCall
|
import app.revanced.util.fingerprint.injectLiteralInstructionBooleanCall
|
||||||
import app.revanced.util.fingerprint.resolvable
|
|
||||||
|
|
||||||
val shortsPlaybackPatch = bytecodePatch(
|
val shortsPlaybackPatch = bytecodePatch(
|
||||||
description = "shortsPlaybackPatch"
|
description = "shortsPlaybackPatch"
|
||||||
@ -15,9 +14,12 @@ val shortsPlaybackPatch = bytecodePatch(
|
|||||||
*
|
*
|
||||||
* RVX applies default video quality to Shorts as well, so this patch is required.
|
* RVX applies default video quality to Shorts as well, so this patch is required.
|
||||||
*/
|
*/
|
||||||
if (shortsPlaybackFingerprint.resolvable()) {
|
mapOf(
|
||||||
shortsPlaybackFingerprint.injectLiteralInstructionBooleanCall(
|
shortsPlaybackPrimaryFingerprint to SHORTS_PLAYBACK_PRIMARY_FEATURE_FLAG,
|
||||||
45387052L,
|
shortsPlaybackSecondaryFingerprint to SHORTS_PLAYBACK_SECONDARY_FEATURE_FLAG
|
||||||
|
).forEach { (fingerprint, literal) ->
|
||||||
|
fingerprint.injectLiteralInstructionBooleanCall(
|
||||||
|
literal,
|
||||||
"0x0"
|
"0x0"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user