Corrected a bunch of lints in "all" (#3035)

This commit is contained in:
TacoTheDank
2020-05-08 18:11:52 -04:00
committed by GitHub
parent 028ba2e084
commit d418ae93b2
15 changed files with 65 additions and 68 deletions

View File

@ -98,15 +98,9 @@ class Generator {
}
}
println("Number of sources successfully generated: ${number - 1}")
if (!DRY_RUN) {
val writer = PrintWriter(relativePath)
writer.write(buffer.toString())
writer.close()
} else {
val writer = PrintWriter(relativePathTest)
writer.write(buffer.toString())
writer.close()
}
val writer = PrintWriter(relativePath)
writer.write(buffer.toString())
writer.close()
}
private fun getDocument(url: String, printStackTrace: Boolean = true): Document? {
@ -223,7 +217,6 @@ class Generator {
}
companion object {
const val DRY_RUN = false
val sources = listOf(
Triple("ar", "مانجا اون لاين", "https://onma.me"),
Triple("en", "Read Comics Online", "https://readcomicsonline.ru"),
@ -311,7 +304,6 @@ class Generator {
// Triple("tr", "ManhuaTR", "http://www.manhua-tr.com"),
val relativePath = System.getProperty("user.dir") + "/src/all/mmrcms/src/eu/kanade/tachiyomi/extension/all/mmrcms/GeneratedSources.kt"
val relativePathTest = System.getProperty("user.dir") + "/src/all/mmrcms/TestGeneratedSources.kt"
@JvmStatic
fun main(args: Array<String>) {

View File

@ -55,7 +55,7 @@ class MyMangaReaderCMSSources : SourceFactory {
val categories = mapToPairs(jsonObject["categories"].array)
var tags = emptyList<Pair<String, String>>()
if (jsonObject["tags"].isJsonArray) {
tags = jsonObject["tags"].asJsonArray.let { mapToPairs(it) }
tags = mapToPairs(jsonObject["tags"].asJsonArray)
}
MyMangaReaderCMSSource(