fix: custom-branding patch failing to get resources

This commit is contained in:
oSumAtrIX
2022-06-15 11:07:10 +02:00
parent ae6e945bfa
commit efb6d4c2be
18 changed files with 4 additions and 4 deletions

View File

@ -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.Package

View File

@ -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.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.PatchResultError
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 java.nio.file.Files
@ -42,7 +42,7 @@ class CustomBrandingPatch : ResourcePatch() {
"mipmap-mdpi" to 48
).forEach { (iconDirectory, size) ->
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.")
Files.write(