mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-26 00:31:49 +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) {
|
||||
it
|
||||
}
|
||||
ExtensionJson(
|
||||
pkgName,
|
||||
sources.map { source -> SourceJson(source) }
|
||||
)
|
||||
pkgName to sources.map { source -> SourceJson(source) }
|
||||
} else null
|
||||
}
|
||||
}.toMap()
|
||||
|
||||
File(outputPath).writeText(Json.encodeToString(extensions))
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data class ExtensionJson(
|
||||
val pkgName: String,
|
||||
val sources: List<SourceJson>
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class SourceJson(
|
||||
val name: String,
|
||||
|
Loading…
Reference in New Issue
Block a user