Compare commits

..

4 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
9 changed files with 31 additions and 20 deletions

View File

@@ -1,3 +1,17 @@
# [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) # [2.180.0](https://github.com/revanced/revanced-patches/compare/v2.179.0...v2.180.0) (2023-07-01)

View File

@@ -229,14 +229,6 @@ The official ReVanced Patches.
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "dbrady://relay". | all | | `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "dbrady://relay". | all |
</details> </details>
### [📦 `com.onelouder.baconreader`](https://play.google.com/store/apps/details?id=com.onelouder.baconreader)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | 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". | all |
</details>
### [📦 `com.rubenmayayo.reddit`](https://play.google.com/store/apps/details?id=com.rubenmayayo.reddit) ### [📦 `com.rubenmayayo.reddit`](https://play.google.com/store/apps/details?id=com.rubenmayayo.reddit)
<details> <details>

View File

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

File diff suppressed because one or more lines are too long

View File

@@ -20,7 +20,12 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Changes the OAuth client ID. " + @Description("Changes the OAuth client ID. " +
"The OAuth application type has to be \"Installed app\" " + "The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"http://baconreader.com/auth\".") "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( class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
"http://baconreader.com/auth", Options, listOf(GetAuthorizationUrlFingerprint, RequestTokenFingerprint) "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( object IsVIPEPFingerprint : MethodFingerprint(
customFingerprint = custom@{ methodDef, _ -> customFingerprint = custom@{ methodDef, _ ->
if (!methodDef.definingClass.endsWith("RealmUserSettings;")) return@custom false if (!methodDef.definingClass.endsWith("RemoteUser;")) return@custom false
methodDef.name == "isVIPEP" methodDef.name == "isVIPEP"
} }

View File

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

View File

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