mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-30 06:34:37 +02:00
chore: update ReadMeFileGenerator
and README-template.md
This commit is contained in:
parent
477f189171
commit
da63185b81
@ -15,12 +15,12 @@ Example:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "Default video quality",
|
||||
"description": "Adds an option to set the default video quality.",
|
||||
"name": "Alternative thumbnails",
|
||||
"description": "Adds options to replace video thumbnails using the DeArrow API or image captures from the video.",
|
||||
"compatiblePackages":[
|
||||
{
|
||||
"name": "com.google.android.youtube",
|
||||
"versions": COMPATIBLE_PACKAGE_YOUTUBE
|
||||
"versions": "COMPATIBLE_PACKAGE_YOUTUBE"
|
||||
}
|
||||
],
|
||||
"use":true,
|
||||
@ -33,7 +33,7 @@ Example:
|
||||
"compatiblePackages": [
|
||||
{
|
||||
"name": "com.google.android.apps.youtube.music",
|
||||
"versions": COMPATIBLE_PACKAGE_MUSIC
|
||||
"versions": "COMPATIBLE_PACKAGE_MUSIC"
|
||||
}
|
||||
],
|
||||
"use":true,
|
||||
@ -46,7 +46,7 @@ Example:
|
||||
"compatiblePackages": [
|
||||
{
|
||||
"name": "com.reddit.frontpage",
|
||||
"versions": COMPATIBLE_PACKAGE_REDDIT
|
||||
"versions": "COMPATIBLE_PACKAGE_REDDIT"
|
||||
}
|
||||
],
|
||||
"use":true,
|
||||
|
@ -33,9 +33,9 @@ internal class ReadMeFileGenerator : PatchesFileGenerator {
|
||||
|
||||
// add a list of supported versions to a temp file
|
||||
mapOf(
|
||||
app.revanced.patches.music.utils.integrations.Constants.COMPATIBLE_PACKAGE to "COMPATIBLE_PACKAGE_MUSIC",
|
||||
app.revanced.patches.reddit.utils.integrations.Constants.COMPATIBLE_PACKAGE to "COMPATIBLE_PACKAGE_REDDIT",
|
||||
app.revanced.patches.youtube.utils.integrations.Constants.COMPATIBLE_PACKAGE to "COMPATIBLE_PACKAGE_YOUTUBE"
|
||||
app.revanced.patches.music.utils.integrations.Constants.COMPATIBLE_PACKAGE to "\"COMPATIBLE_PACKAGE_MUSIC\"",
|
||||
app.revanced.patches.reddit.utils.integrations.Constants.COMPATIBLE_PACKAGE to "\"COMPATIBLE_PACKAGE_REDDIT\"",
|
||||
app.revanced.patches.youtube.utils.integrations.Constants.COMPATIBLE_PACKAGE to "\"COMPATIBLE_PACKAGE_YOUTUBE\""
|
||||
).forEach { (compatiblePackage, replaceString) ->
|
||||
compatiblePackage.map { CompatiblePackage(it.name, it.versions?.toSet()?.ifEmpty { null }) }
|
||||
.forEach { compatiblePackages ->
|
||||
@ -48,7 +48,7 @@ internal class ReadMeFileGenerator : PatchesFileGenerator {
|
||||
?.replace("[", "[\n \"")
|
||||
?.replace("]", "\"\n ]")
|
||||
?.replace(", ", "\",\n \"")
|
||||
?: "all"
|
||||
?: "\"ALL\""
|
||||
}
|
||||
|
||||
StringBuilder(readMeTemplateTempFile.readText())
|
||||
@ -88,7 +88,7 @@ internal class ReadMeFileGenerator : PatchesFileGenerator {
|
||||
} else if (exception.containsKey(pkg))
|
||||
exception[pkg] + "+"
|
||||
else
|
||||
"all"
|
||||
"ALL"
|
||||
|
||||
appendLine(
|
||||
"| `${patch.name}` " +
|
||||
|
Loading…
x
Reference in New Issue
Block a user