fix: custom-branding
patch failing to get resources
@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.layout.icon.annotations
|
package app.revanced.patches.youtube.layout.branding.annotations
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
import app.revanced.patcher.annotation.Package
|
import app.revanced.patcher.annotation.Package
|
@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.layout.icon.patch
|
package app.revanced.patches.youtube.layout.branding.patch
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
@ -10,7 +10,7 @@ import app.revanced.patcher.patch.implementation.ResourcePatch
|
|||||||
import app.revanced.patcher.patch.implementation.misc.PatchResult
|
import app.revanced.patcher.patch.implementation.misc.PatchResult
|
||||||
import app.revanced.patcher.patch.implementation.misc.PatchResultError
|
import app.revanced.patcher.patch.implementation.misc.PatchResultError
|
||||||
import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess
|
import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess
|
||||||
import app.revanced.patches.youtube.layout.icon.annotations.CustomBrandingCompatibility
|
import app.revanced.patches.youtube.layout.branding.annotations.CustomBrandingCompatibility
|
||||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ class CustomBrandingPatch : ResourcePatch() {
|
|||||||
"mipmap-mdpi" to 48
|
"mipmap-mdpi" to 48
|
||||||
).forEach { (iconDirectory, size) ->
|
).forEach { (iconDirectory, size) ->
|
||||||
iconNames.forEach iconLoop@{ iconName ->
|
iconNames.forEach iconLoop@{ iconName ->
|
||||||
val iconFile = this.javaClass.classLoader.getResourceAsStream("$size/$iconName.png")
|
val iconFile = this.javaClass.classLoader.getResourceAsStream("branding/$size/$iconName.png")
|
||||||
?: return PatchResultError("The icon $iconName can not be found.")
|
?: return PatchResultError("The icon $iconName can not be found.")
|
||||||
|
|
||||||
Files.write(
|
Files.write(
|
Before Width: | Height: | Size: 483 B After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |