mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-26 16:51:50 +01:00
Use a map
This commit is contained in:
parent
4452c89dbb
commit
afd659813d
@ -25,22 +25,13 @@ object InspectorMain {
|
|||||||
val (pkgName, sources) = installAPK(tmpDir) {
|
val (pkgName, sources) = installAPK(tmpDir) {
|
||||||
it
|
it
|
||||||
}
|
}
|
||||||
ExtensionJson(
|
pkgName to sources.map { source -> SourceJson(source) }
|
||||||
pkgName,
|
|
||||||
sources.map { source -> SourceJson(source) }
|
|
||||||
)
|
|
||||||
} else null
|
} else null
|
||||||
}
|
}.toMap()
|
||||||
|
|
||||||
File(outputPath).writeText(Json.encodeToString(extensions))
|
File(outputPath).writeText(Json.encodeToString(extensions))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class ExtensionJson(
|
|
||||||
val pkgName: String,
|
|
||||||
val sources: List<SourceJson>
|
|
||||||
)
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class SourceJson(
|
data class SourceJson(
|
||||||
val name: String,
|
val name: String,
|
||||||
|
Loading…
Reference in New Issue
Block a user