Compare commits

..

6 Commits

Author SHA1 Message Date
semantic-release-bot
503b000e79 chore(release): 2.181.0-dev.2 [skip ci]
# [2.181.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.1...v2.181.0-dev.2) (2023-07-01)

### Bug Fixes

* **trakt:** bump compatibility to newer version ([#2554](https://github.com/revanced/revanced-patches/issues/2554)) ([288b1eb](288b1ebe7b))
2023-07-01 14:46:51 +00:00
johnconner122
288b1ebe7b fix(trakt): bump compatibility to newer version (#2554) 2023-07-01 16:44:45 +02:00
semantic-release-bot
2ed95497bb chore(release): 2.181.0-dev.1 [skip ci]
# [2.181.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.180.0...v2.181.0-dev.1) (2023-07-01)

### Features

* **baconreader/change-oauth-client-id:** add compatibility for premium package ([#2550](https://github.com/revanced/revanced-patches/issues/2550)) ([fb16f7a](fb16f7a65d))
2023-07-01 12:48:21 +00:00
Aunali321
fb16f7a65d feat(baconreader/change-oauth-client-id): add compatibility for premium package (#2550) 2023-07-01 14:46:17 +02:00
semantic-release-bot
926f38055a chore(release): 2.180.0 [skip ci]
# [2.180.0](https://github.com/revanced/revanced-patches/compare/v2.179.0...v2.180.0) (2023-07-01)

### Features

* use clearer descriptions for patches ([7814e46](7814e464e1))
2023-07-01 01:12:52 +00:00
oSumAtrIX
8e32956dd6 chore: merge branch dev to main (#2542) 2023-07-01 03:10:51 +02:00
7 changed files with 37 additions and 11 deletions

View File

@@ -1,3 +1,24 @@
# [2.181.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.181.0-dev.1...v2.181.0-dev.2) (2023-07-01)
### Bug Fixes
* **trakt:** bump compatibility to newer version ([#2554](https://github.com/revanced/revanced-patches/issues/2554)) ([2a2897d](https://github.com/revanced/revanced-patches/commit/2a2897dc9e81799a3318875122fc7b49692e3764))
# [2.181.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.180.0...v2.181.0-dev.1) (2023-07-01)
### Features
* **baconreader/change-oauth-client-id:** add compatibility for premium package ([#2550](https://github.com/revanced/revanced-patches/issues/2550)) ([4d1b0b4](https://github.com/revanced/revanced-patches/commit/4d1b0b442768be4f7a12de63d8b973b2ca113f23))
# [2.180.0](https://github.com/revanced/revanced-patches/compare/v2.179.0...v2.180.0) (2023-07-01)
### Features
* use clearer descriptions for patches ([ff3ca30](https://github.com/revanced/revanced-patches/commit/ff3ca30e31f4d603b80d35e150f49d996acf9988))
# [2.180.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.179.0...v2.180.0-dev.1) (2023-07-01)

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 2.180.0-dev.1
version = 2.181.0-dev.2

View File

@@ -20,7 +20,12 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Changes the OAuth client ID. " +
"The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"http://baconreader.com/auth\".")
@Compatibility([Package("com.onelouder.baconreader")])
@Compatibility(
[
Package("com.onelouder.baconreader"),
Package("com.onelouder.baconreader.premium")
]
)
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
"http://baconreader.com/auth", Options, listOf(GetAuthorizationUrlFingerprint, RequestTokenFingerprint)
) {

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object IsVIPEPFingerprint : MethodFingerprint(
customFingerprint = custom@{ methodDef, _ ->
if (!methodDef.definingClass.endsWith("RealmUserSettings;")) return@custom false
if (!methodDef.definingClass.endsWith("RemoteUser;")) return@custom false
methodDef.name == "isVIPEP"
}

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object IsVIPFingerprint : MethodFingerprint(
customFingerprint = custom@{ methodDef, _ ->
if (!methodDef.definingClass.endsWith("RealmUserSettings;")) return@custom false
if (!methodDef.definingClass.endsWith("RemoteUser;")) return@custom false
methodDef.name == "isVIP"
}

View File

@@ -2,8 +2,8 @@ package app.revanced.patches.trakt.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object RealmUserSettingsFingerprint : MethodFingerprint(
object RemoteUserFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("RealmUserSettings;")
methodDef.definingClass.endsWith("RemoteUser;")
}
)

View File

@@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.trakt.annotations.UnlockProCompatibility
import app.revanced.patches.trakt.fingerprints.IsVIPEPFingerprint
import app.revanced.patches.trakt.fingerprints.IsVIPFingerprint
import app.revanced.patches.trakt.fingerprints.RealmUserSettingsFingerprint
import app.revanced.patches.trakt.fingerprints.RemoteUserFingerprint
@Patch
@Name("unlock-pro")
@@ -22,20 +22,20 @@ import app.revanced.patches.trakt.fingerprints.RealmUserSettingsFingerprint
@UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch(
listOf(RealmUserSettingsFingerprint)
listOf(RemoteUserFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
RealmUserSettingsFingerprint.result?.classDef?.let { realUserSettingsClass ->
RemoteUserFingerprint.result?.classDef?.let { remoteUserClass ->
arrayOf(IsVIPFingerprint, IsVIPEPFingerprint).onEach { fingerprint ->
// Resolve both fingerprints on the same class.
if (!fingerprint.resolve(context, realUserSettingsClass))
if (!fingerprint.resolve(context, remoteUserClass))
throw fingerprint.toErrorResult()
}.forEach { fingerprint ->
// Return true for both VIP check methods.
fingerprint.result?.mutableMethod?.addInstructions(0, RETURN_TRUE_INSTRUCTIONS)
?: return fingerprint.toErrorResult()
}
} ?: return RealmUserSettingsFingerprint.toErrorResult()
} ?: return RemoteUserFingerprint.toErrorResult()
return PatchResultSuccess()
}