Compare commits

...

7 Commits

Author SHA1 Message Date
semantic-release-bot
543464f159 chore(release): 2.58.0 [skip ci]
# [2.58.0](https://github.com/oSumAtrIX/revanced-patches/compare/v2.57.0...v2.58.0) (2022-09-17)

### Features

* migrate to `osumatrix/revanced-patcher` dependency ([d20a2d9](331107288d))
2022-09-17 02:31:44 +00:00
oSumAtrIX
de2f9c9d83 build: bump patcher dependency version
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-17 04:28:44 +02:00
oSumAtrIX
b2bca0167a refactor(custom-branding): use getValue operator for options
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-17 04:26:29 +02:00
oSumAtrIX
2f1fef0449 Merge remote-tracking branch 'revanced/main'
# Conflicts:
#	src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt
#	src/main/kotlin/app/revanced/patches/youtube/layout/customthemes/patch/CustomThemePatch.kt
2022-09-17 04:20:49 +02:00
oSumAtrIX
5a058ebcf1 docs: add missing section for patches [skip ci]
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-13 21:36:56 +02:00
oSumAtrIX
011f413088 docs: add differences section in README
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-13 21:36:56 +02:00
oSumAtrIX
331107288d feat: migrate to osumatrix/revanced-patcher dependency
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-09-13 21:36:44 +02:00
10 changed files with 54 additions and 28 deletions

View File

@@ -1,3 +1,10 @@
# [2.58.0](https://github.com/oSumAtrIX/revanced-patches/compare/v2.57.0...v2.58.0) (2022-09-17)
### Features
* migrate to `osumatrix/revanced-patcher` dependency ([d20a2d9](https://github.com/oSumAtrIX/revanced-patches/commit/d20a2d961896d84180d4573aae0aa8128cce5a22))
# [2.57.0](https://github.com/revanced/revanced-patches/compare/v2.56.1...v2.57.0) (2022-09-16)

View File

@@ -1,12 +1,18 @@
## 🧩 Patches
The official Patch bundle provided by ReVanced and the community.
Patch bundle provided by ReVanced and the community.
> Looking for the JSON variant of this? [Click here](patches.json).
### ⛏ Differences to [revanced/revanced-patches](https://github.com/revanced/revanced-patches)
- Based on [osumatrix/revanced-patcher](https://github.com/osumatrix/revanced-patcher)
- Minor QoL refactoring
- Several additional patches
### 💊 Patches
{{ table }}
## 📝 JSON Format
### 📝 JSON Format
This section explains the JSON format for the [patches.json](patches.json) file.

View File

@@ -1,8 +1,14 @@
## 🧩 Patches
The official Patch bundle provided by ReVanced and the community.
Patch bundle provided by ReVanced and the community.
> Looking for the JSON variant of this? [Click here](patches.json).
### ⛏ Differences to [revanced/revanced-patches](https://github.com/revanced/revanced-patches)
- Based on [osumatrix/revanced-patcher](https://github.com/osumatrix/revanced-patcher)
- Minor QoL refactoring
- Several additional patches
### 💊 Patches
### 📦 `com.twitter.android`
<details>
@@ -90,11 +96,11 @@ The official Patch bundle provided by ReVanced and the community.
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.33.42 |
| `old-quality-layout` | Enables the original quality flyout menu. | 17.33.42 |
| `theme` | Applies a custom theme. | all |
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.33.42 |
| `hide-watermark` | Hides creator's watermarks on videos. | 17.33.42 |
| `sponsorblock` | Integrate SponsorBlock. | 17.33.42 |
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.33.42 |
| `custom-theme` | Applies a custom theme. | all |
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.33.42 |
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.33.42 |
| `minimized-playback` | Enables minimized and background playback. | 17.33.42 |
@@ -122,7 +128,7 @@ The official Patch bundle provided by ReVanced and the community.
## 📝 JSON Format
### 📝 JSON Format
This section explains the JSON format for the [patches.json](patches.json) file.

View File

@@ -11,7 +11,14 @@ repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
url = uri("https://maven.pkg.github.com/osumatrix/revanced-patcher")
credentials {
username = githubUsername
password = githubPassword
}
}
maven {
url = uri("https://maven.pkg.github.com/revanced/multidexlib2")
credentials {
username = githubUsername
password = githubPassword
@@ -20,7 +27,7 @@ repositories {
}
dependencies {
implementation("app.revanced:revanced-patcher:4.2.3")
implementation("app.revanced:revanced-patcher:4.5.0")
implementation("app.revanced:multidexlib2:2.5.2.r2")
// Required for meta

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 2.57.0
version = 2.58.0

File diff suppressed because one or more lines are too long

View File

@@ -10,10 +10,11 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
import java.nio.file.Files
import java.nio.file.Path
import kotlin.io.path.exists
import kotlin.io.path.inputStream
@Patch
@DependsOn([FixLocaleConfigErrorPatch::class])
@@ -66,21 +67,21 @@ class CustomBrandingPatch : ResourcePatch() {
}
private fun getIconStream(iconPath: String): InputStream? {
if (appIconPath == null) {
return this.javaClass.classLoader.getResourceAsStream(iconPath)
}
val file = File(appIconPath!!).resolve(iconPath)
if (!file.exists()) return null
return FileInputStream(file)
val path = Path.of(appIconPath ?: return this.javaClass.classLoader.getResourceAsStream(iconPath))
return if (path.exists())
path.inputStream()
else
null
}
companion object : OptionsContainer() {
private var appName: String? by option(
PatchOption.StringOption(
key = "appName",
default = "YouTube ReVanced",
title = "Application Name",
description = "The name of the application it will show on your home screen.",
default = "YouTube ReVanced",
required = true
)
)
@@ -88,7 +89,6 @@ class CustomBrandingPatch : ResourcePatch() {
private var appIconPath: String? by option(
PatchOption.StringOption(
key = "appIconPath",
default = null,
title = "Application Icon Path",
description = "A path to the icon of the application."
)

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.theme.annotations
package app.revanced.patches.youtube.layout.customthemes.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@@ -6,4 +6,4 @@ import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class ThemeCompatibility
internal annotation class CustomThemeCompatibility

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.theme.patch
package app.revanced.patches.youtube.layout.customthemes.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
@@ -11,17 +11,17 @@ import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.theme.annotations.ThemeCompatibility
import app.revanced.patches.youtube.layout.customthemes.annotations.CustomThemeCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import org.w3c.dom.Element
@Patch
@DependsOn([FixLocaleConfigErrorPatch::class])
@Name("theme")
@Name("custom-theme")
@Description("Applies a custom theme.")
@ThemeCompatibility
@CustomThemeCompatibility
@Version("0.0.1")
class ThemePatch : ResourcePatch() {
class CustomThemePatch : ResourcePatch() {
override fun execute(data: ResourceData): PatchResult {
val backgroundColor = backgroundColor!!