diff --git a/.run/BakaMangaGenerator.run.xml b/.run/BakaMangaGenerator.run.xml index b0cc06ee6..3166fb8f9 100644 --- a/.run/BakaMangaGenerator.run.xml +++ b/.run/BakaMangaGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/BakkinGenerator.run.xml b/.run/BakkinGenerator.run.xml index c8e88d1b2..077e52980 100644 --- a/.run/BakkinGenerator.run.xml +++ b/.run/BakkinGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/BilibiliGenerator.run.xml b/.run/BilibiliGenerator.run.xml index acb5cd96d..35d79c7d4 100644 --- a/.run/BilibiliGenerator.run.xml +++ b/.run/BilibiliGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/ChanGenerator.run.xml b/.run/ChanGenerator.run.xml new file mode 100644 index 000000000..f4f915b37 --- /dev/null +++ b/.run/ChanGenerator.run.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.run/ComiCakeGenerator.run.xml b/.run/ComiCakeGenerator.run.xml index 6199f212b..b033d1410 100644 --- a/.run/ComiCakeGenerator.run.xml +++ b/.run/ComiCakeGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/ComicGammaGenerator.run.xml b/.run/ComicGammaGenerator.run.xml index 71b169330..8b8c6d2be 100644 --- a/.run/ComicGammaGenerator.run.xml +++ b/.run/ComicGammaGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/EroMuseGenerator.run.xml b/.run/EroMuseGenerator.run.xml index df89ae9d0..fe4ababf5 100644 --- a/.run/EroMuseGenerator.run.xml +++ b/.run/EroMuseGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/FMReaderGenerator.run.xml b/.run/FMReaderGenerator.run.xml index 85ab8d6f4..efc32a260 100644 --- a/.run/FMReaderGenerator.run.xml +++ b/.run/FMReaderGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/FoolSlideGenerator.run.xml b/.run/FoolSlideGenerator.run.xml index 9c1f7deb2..044043f70 100644 --- a/.run/FoolSlideGenerator.run.xml +++ b/.run/FoolSlideGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/GattsuGenerator.run.xml b/.run/GattsuGenerator.run.xml index eedd47afc..771b6a20e 100644 --- a/.run/GattsuGenerator.run.xml +++ b/.run/GattsuGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/GenkanGenerator.run.xml b/.run/GenkanGenerator.run.xml index 4d8d4b802..7c1929694 100644 --- a/.run/GenkanGenerator.run.xml +++ b/.run/GenkanGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/GenkanOriginalGenerator.run.xml b/.run/GenkanOriginalGenerator.run.xml index c05913779..6006407f6 100644 --- a/.run/GenkanOriginalGenerator.run.xml +++ b/.run/GenkanOriginalGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/GigaViewerGenerator.run.xml b/.run/GigaViewerGenerator.run.xml index 18e110714..f51346317 100644 --- a/.run/GigaViewerGenerator.run.xml +++ b/.run/GigaViewerGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/GroupLeGenerator.run.xml b/.run/GroupLeGenerator.run.xml new file mode 100644 index 000000000..4f5aeff14 --- /dev/null +++ b/.run/GroupLeGenerator.run.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.run/GuyaGenerator.run.xml b/.run/GuyaGenerator.run.xml index 0e0fc6fab..b24a84cec 100644 --- a/.run/GuyaGenerator.run.xml +++ b/.run/GuyaGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/HentaiHandGenerator.run.xml b/.run/HentaiHandGenerator.run.xml new file mode 100644 index 000000000..af0be7fcc --- /dev/null +++ b/.run/HentaiHandGenerator.run.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.run/KemonoGenerator.run.xml b/.run/KemonoGenerator.run.xml index 2ac0c58da..c68bc4a86 100644 --- a/.run/KemonoGenerator.run.xml +++ b/.run/KemonoGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/LibGenerator.run.xml b/.run/LibGenerator.run.xml new file mode 100644 index 000000000..b65311b42 --- /dev/null +++ b/.run/LibGenerator.run.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.run/LusciousGenerator.run.xml b/.run/LusciousGenerator.run.xml deleted file mode 100644 index ffe9f241e..000000000 --- a/.run/LusciousGenerator.run.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.run/MCCMSGenerator.run.xml b/.run/MCCMSGenerator.run.xml index 9251fcd65..054dc8fc1 100644 --- a/.run/MCCMSGenerator.run.xml +++ b/.run/MCCMSGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MDBGenerator.run.xml b/.run/MDBGenerator.run.xml index cf014fd0d..b3fffaabe 100644 --- a/.run/MDBGenerator.run.xml +++ b/.run/MDBGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MMRCMSGenerator.run.xml b/.run/MMRCMSGenerator.run.xml index 09973bf6e..81eaf7690 100644 --- a/.run/MMRCMSGenerator.run.xml +++ b/.run/MMRCMSGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MadThemeGenerator.run.xml b/.run/MadThemeGenerator.run.xml index fd0dfd218..2124d454f 100644 --- a/.run/MadThemeGenerator.run.xml +++ b/.run/MadThemeGenerator.run.xml @@ -1,17 +1,11 @@ - - - - \ No newline at end of file + + + + diff --git a/.run/MadaraGenerator.run.xml b/.run/MadaraGenerator.run.xml index 784f76523..5934a39ce 100644 --- a/.run/MadaraGenerator.run.xml +++ b/.run/MadaraGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MangAdventureGenerator.run.xml b/.run/MangAdventureGenerator.run.xml index c4f8e0a86..521635b46 100644 --- a/.run/MangAdventureGenerator.run.xml +++ b/.run/MangAdventureGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MangaBoxGenerator.run.xml b/.run/MangaBoxGenerator.run.xml index c2a20df3f..f6c2f5537 100644 --- a/.run/MangaBoxGenerator.run.xml +++ b/.run/MangaBoxGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MangaCatalogGenerator.run.xml b/.run/MangaCatalogGenerator.run.xml index 7b4c284e9..551633cfd 100644 --- a/.run/MangaCatalogGenerator.run.xml +++ b/.run/MangaCatalogGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MangaHubGenerator.run.xml b/.run/MangaHubGenerator.run.xml index 28ab10935..f9af265a8 100644 --- a/.run/MangaHubGenerator.run.xml +++ b/.run/MangaHubGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MangaMainacGenerator.run.xml b/.run/MangaMainacGenerator.run.xml index b9b20da67..05aedc7ee 100644 --- a/.run/MangaMainacGenerator.run.xml +++ b/.run/MangaMainacGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MangaRawGenerator.run.xml b/.run/MangaRawGenerator.run.xml new file mode 100644 index 000000000..792265395 --- /dev/null +++ b/.run/MangaRawGenerator.run.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.run/MangaSarGenerator.run.xml b/.run/MangaSarGenerator.run.xml index 97f343d2a..06529fe67 100644 --- a/.run/MangaSarGenerator.run.xml +++ b/.run/MangaSarGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/MangaWorldGenerator.run.xml b/.run/MangaWorldGenerator.run.xml new file mode 100644 index 000000000..f8a837107 --- /dev/null +++ b/.run/MangaWorldGenerator.run.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.run/MonochromeGenerator.run.xml b/.run/MonochromeGenerator.run.xml new file mode 100644 index 000000000..11059802d --- /dev/null +++ b/.run/MonochromeGenerator.run.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.run/MyMangaCMSGenerator.run.xml b/.run/MyMangaCMSGenerator.run.xml new file mode 100644 index 000000000..861655d3d --- /dev/null +++ b/.run/MyMangaCMSGenerator.run.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/.run/NepNepGenerator.run.xml b/.run/NepNepGenerator.run.xml index eec50bbaf..2792cfeb8 100644 --- a/.run/NepNepGenerator.run.xml +++ b/.run/NepNepGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/NyaHentaiGenerator.run.xml b/.run/NyaHentaiGenerator.run.xml deleted file mode 100644 index 2fa18896f..000000000 --- a/.run/NyaHentaiGenerator.run.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.run/PaprikaAltGenerator.run.xml b/.run/PaprikaAltGenerator.run.xml index ff6422798..88fb4350f 100644 --- a/.run/PaprikaAltGenerator.run.xml +++ b/.run/PaprikaAltGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/PaprikaGenerator.run.xml b/.run/PaprikaGenerator.run.xml index ca03466f1..6475c4950 100644 --- a/.run/PaprikaGenerator.run.xml +++ b/.run/PaprikaGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/PizzaReaderGenerator.run.xml b/.run/PizzaReaderGenerator.run.xml index 9ae507923..392c3d85c 100644 --- a/.run/PizzaReaderGenerator.run.xml +++ b/.run/PizzaReaderGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/ReaderFrontGenerator.run.xml b/.run/ReaderFrontGenerator.run.xml index 1913aa55f..20e8685d7 100644 --- a/.run/ReaderFrontGenerator.run.xml +++ b/.run/ReaderFrontGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/SinMHGenerator.run.xml b/.run/SinMHGenerator.run.xml index 31c7d75f1..fb16f608a 100644 --- a/.run/SinMHGenerator.run.xml +++ b/.run/SinMHGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/WPComicsGenerator.run.xml b/.run/WPComicsGenerator.run.xml index 18d231f03..a03ca1563 100644 --- a/.run/WPComicsGenerator.run.xml +++ b/.run/WPComicsGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/WPMangaStreamGenerator.run.xml b/.run/WPMangaStreamGenerator.run.xml index a81ef9aac..341c39572 100644 --- a/.run/WPMangaStreamGenerator.run.xml +++ b/.run/WPMangaStreamGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/WebtoonsGenerator.run.xml b/.run/WebtoonsGenerator.run.xml index 46410fa96..9dbe554c3 100644 --- a/.run/WebtoonsGenerator.run.xml +++ b/.run/WebtoonsGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/WebtoonsTranslateGenerator.run.xml b/.run/WebtoonsTranslateGenerator.run.xml index 892c49a1f..a7ade27bb 100644 --- a/.run/WebtoonsTranslateGenerator.run.xml +++ b/.run/WebtoonsTranslateGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/WeebreaderGenerator.run.xml b/.run/WeebreaderGenerator.run.xml index 0c80a0550..3aa96b3a8 100644 --- a/.run/WeebreaderGenerator.run.xml +++ b/.run/WeebreaderGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/WpMangaReaderGenerator.run.xml b/.run/WpMangaReaderGenerator.run.xml index 5aab1ea24..b8da10d7e 100644 --- a/.run/WpMangaReaderGenerator.run.xml +++ b/.run/WpMangaReaderGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/ZMangaGenerator.run.xml b/.run/ZMangaGenerator.run.xml index 71a971890..e47185c93 100644 --- a/.run/ZMangaGenerator.run.xml +++ b/.run/ZMangaGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/.run/ZbuluGenerator.run.xml b/.run/ZbuluGenerator.run.xml index f46e0eb28..7374b7d71 100644 --- a/.run/ZbuluGenerator.run.xml +++ b/.run/ZbuluGenerator.run.xml @@ -1,17 +1,11 @@ - - - \ No newline at end of file + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d589976f..d56659031 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,6 +82,8 @@ Some alternative steps can be followed to ignore "repo" branch and skip unrelate # allow a multisrc theme /multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/ /multisrc/overrides/ + # or type the source name directly + ``` 4. Configure remotes. ```bash @@ -496,6 +498,9 @@ with open(f"{package}/src/{source}.kt", "w") as f: - For each time a source changes in a way that should the version increase, `overrideVersionCode` should be increased by one. - When a theme's default implementation changes, `baseVersionCode` should be increased, the initial value should be `1`. - For example, for a new theme with a new source, extention version code will be `0 + 0 + 1 = 1`. +- `IntelijConfigurationGeneratorMainKt` should be run on creating or removing a multisrc theme. + - On removing a theme, you can manually remove the corresponding configuration in the `.run` folder instead. + - Be careful if you're using sparse checkout. If other configurations are accidentally removed, `git add` the file you want and `git restore` the others. Another choice is to allow `/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/*` before running the generator. ## Running diff --git a/multisrc/build.gradle.kts b/multisrc/build.gradle.kts index b43002ce3..9adf5ba48 100644 --- a/multisrc/build.gradle.kts +++ b/multisrc/build.gradle.kts @@ -71,14 +71,24 @@ tasks { throw Exception("Java process failed with exit code: $exitCode") } } - dependsOn("ktFormat", "ktLint", "assembleDebug") + dependsOn("ktLint", "assembleDebug") } register("ktLint") { + if (project.hasProperty("theme")) { + val theme = project.property("theme") + source(files("src/main/java/eu/kanade/tachiyomi/multisrc/$theme", "overrides/$theme")) + return@register + } source(files("src", "overrides")) } register("ktFormat") { + if (project.hasProperty("theme")) { + val theme = project.property("theme") + source(files("src/main/java/eu/kanade/tachiyomi/multisrc/$theme", "overrides/$theme")) + return@register + } source(files("src", "overrides")) } } diff --git a/multisrc/overrides/grouple/allhentai/src/AllHentai.kt b/multisrc/overrides/grouple/allhentai/src/AllHentai.kt index 2217b9217..e9a7e007b 100644 --- a/multisrc/overrides/grouple/allhentai/src/AllHentai.kt +++ b/multisrc/overrides/grouple/allhentai/src/AllHentai.kt @@ -7,7 +7,7 @@ import eu.kanade.tachiyomi.source.model.FilterList import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.Request -class AllHentai : GroupLe("AllHentai", "http://23.allhen.online", "ru"){ +class AllHentai : GroupLe("AllHentai", "http://23.allhen.online", "ru") { override val id: Long = 1809051393403180443 @@ -52,7 +52,7 @@ class AllHentai : GroupLe("AllHentai", "http://23.allhen.online", "ru"){ } return if (url.toString().contains("?")) GET(url.toString().replace("=%3D", "="), headers) - else popularMangaRequest(page) + else popularMangaRequest(page) } private class OrderBy : Filter.Select( diff --git a/multisrc/overrides/grouple/mintmanga/src/MintManga.kt b/multisrc/overrides/grouple/mintmanga/src/MintManga.kt index 56f492561..8eeb71a25 100644 --- a/multisrc/overrides/grouple/mintmanga/src/MintManga.kt +++ b/multisrc/overrides/grouple/mintmanga/src/MintManga.kt @@ -7,7 +7,7 @@ import eu.kanade.tachiyomi.source.model.FilterList import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.Request -class MintManga : GroupLe("MintManga", "https://mintmanga.live", "ru"){ +class MintManga : GroupLe("MintManga", "https://mintmanga.live", "ru") { override val id: Long = 6 @@ -55,7 +55,7 @@ class MintManga : GroupLe("MintManga", "https://mintmanga.live", "ru"){ } return if (url.toString().contains("?")) GET(url.toString().replace("=%3D", "="), headers) - else popularMangaRequest(page) + else popularMangaRequest(page) } private class OrderBy : Filter.Select( diff --git a/multisrc/overrides/grouple/readmanga/src/ReadManga.kt b/multisrc/overrides/grouple/readmanga/src/ReadManga.kt index 97feac328..911b102f3 100644 --- a/multisrc/overrides/grouple/readmanga/src/ReadManga.kt +++ b/multisrc/overrides/grouple/readmanga/src/ReadManga.kt @@ -1,6 +1,5 @@ package eu.kanade.tachiyomi.extension.ru.readmanga -import android.widget.Toast import eu.kanade.tachiyomi.multisrc.grouple.GroupLe import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.Filter @@ -8,7 +7,7 @@ import eu.kanade.tachiyomi.source.model.FilterList import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.Request -class ReadManga : GroupLe("ReadManga", "https://readmanga.live", "ru"){ +class ReadManga : GroupLe("ReadManga", "https://readmanga.live", "ru") { override val id: Long = 5 @@ -56,7 +55,7 @@ class ReadManga : GroupLe("ReadManga", "https://readmanga.live", "ru"){ } return if (url.toString().contains("?")) GET(url.toString().replace("=%3D", "="), headers) - else popularMangaRequest(page) + else popularMangaRequest(page) } private class OrderBy : Filter.Select( diff --git a/multisrc/overrides/grouple/rumix/src/RuMIX.kt b/multisrc/overrides/grouple/rumix/src/RuMIX.kt index 26b7e355f..9ab06a1e6 100644 --- a/multisrc/overrides/grouple/rumix/src/RuMIX.kt +++ b/multisrc/overrides/grouple/rumix/src/RuMIX.kt @@ -1,14 +1,12 @@ package eu.kanade.tachiyomi.extension.ru.rumix -import android.widget.Toast import eu.kanade.tachiyomi.multisrc.grouple.GroupLe import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.Request -class RuMIX : GroupLe("RuMIX", "https://rumix.me", "ru"){ +class RuMIX : GroupLe("RuMIX", "https://rumix.me", "ru") { override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { val url = "$baseUrl/search/advanced".toHttpUrlOrNull()!!.newBuilder() @@ -17,7 +15,6 @@ class RuMIX : GroupLe("RuMIX", "https://rumix.me", "ru"){ } return if (url.toString().contains("?")) GET(url.toString().replace("=%3D", "="), headers) - else popularMangaRequest(page) + else popularMangaRequest(page) } - } diff --git a/multisrc/overrides/grouple/selfmanga/src/SelfManga.kt b/multisrc/overrides/grouple/selfmanga/src/SelfManga.kt index 86bc21516..762a2eb44 100644 --- a/multisrc/overrides/grouple/selfmanga/src/SelfManga.kt +++ b/multisrc/overrides/grouple/selfmanga/src/SelfManga.kt @@ -33,7 +33,7 @@ class SelfManga : GroupLe("SelfManga", "https://selfmanga.live", "ru") { } return if (url.toString().contains("?")) GET(url.toString().replace("=%3D", "="), headers) - else popularMangaRequest(page) + else popularMangaRequest(page) } private class Genre(name: String, val id: String) : Filter.TriState(name) diff --git a/multisrc/overrides/libgroup/hentailib/src/HentaiLib.kt b/multisrc/overrides/libgroup/hentailib/src/HentaiLib.kt index 39a186dfa..dc32b5e0f 100644 --- a/multisrc/overrides/libgroup/hentailib/src/HentaiLib.kt +++ b/multisrc/overrides/libgroup/hentailib/src/HentaiLib.kt @@ -48,7 +48,6 @@ class HentaiLib : LibGroup("HentaiLib", "https://hentailib.me", "ru") { return POST(url.toString(), catalogHeaders()) } - // Filters private class SearchFilter(name: String, val id: String) : Filter.TriState(name) diff --git a/multisrc/overrides/libgroup/mangalib/src/MangaLib.kt b/multisrc/overrides/libgroup/mangalib/src/MangaLib.kt index b2b60ee5e..a1088e3d8 100644 --- a/multisrc/overrides/libgroup/mangalib/src/MangaLib.kt +++ b/multisrc/overrides/libgroup/mangalib/src/MangaLib.kt @@ -15,7 +15,7 @@ import okhttp3.Request import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -class MangaLib : LibGroup("MangaLib", "https://mangalib.me", "ru") { +class MangaLib : LibGroup("MangaLib", "https://mangalib.me", "ru") { override val id: Long = 6111047689498497237 diff --git a/multisrc/overrides/libgroup/yaoilib/src/YaoiLib.kt b/multisrc/overrides/libgroup/yaoilib/src/YaoiLib.kt index 899d3b307..8abe8b8cc 100644 --- a/multisrc/overrides/libgroup/yaoilib/src/YaoiLib.kt +++ b/multisrc/overrides/libgroup/yaoilib/src/YaoiLib.kt @@ -51,7 +51,6 @@ class YaoiLib : LibGroup("YaoiLib", "https://yaoilib.me", "ru") { return POST(url.toString(), catalogHeaders()) } - // Filters private class SearchFilter(name: String, val id: String) : Filter.TriState(name) private class CheckFilter(name: String, val id: String) : Filter.CheckBox(name) diff --git a/multisrc/overrides/mangaraw/manga1001/src/Manga1001.kt b/multisrc/overrides/mangaraw/manga1001/src/Manga1001.kt index 57402c63d..f21c0ff04 100644 --- a/multisrc/overrides/mangaraw/manga1001/src/Manga1001.kt +++ b/multisrc/overrides/mangaraw/manga1001/src/Manga1001.kt @@ -1,7 +1,5 @@ package eu.kanade.tachiyomi.extension.ja.manga1001 import eu.kanade.tachiyomi.multisrc.mangaraw.MangaRaw -import eu.kanade.tachiyomi.network.GET -class Manga1001 : MangaRaw("Manga1001", "https://manga1001.top") { -} +class Manga1001 : MangaRaw("Manga1001", "https://manga1001.top") diff --git a/multisrc/overrides/mangaraw/manga9co/src/Manga9co.kt b/multisrc/overrides/mangaraw/manga9co/src/Manga9co.kt index f7d46ff12..10e8d8bf1 100644 --- a/multisrc/overrides/mangaraw/manga9co/src/Manga9co.kt +++ b/multisrc/overrides/mangaraw/manga9co/src/Manga9co.kt @@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.extension.ja.manga9co import eu.kanade.tachiyomi.multisrc.mangaraw.MangaRaw import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.FilterList -import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import okhttp3.Request diff --git a/multisrc/overrides/mangaraw/syosetu/src/SyoSetu.kt b/multisrc/overrides/mangaraw/syosetu/src/SyoSetu.kt index 205d1212b..be45ad60b 100644 --- a/multisrc/overrides/mangaraw/syosetu/src/SyoSetu.kt +++ b/multisrc/overrides/mangaraw/syosetu/src/SyoSetu.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.extension.ja.syosetu import eu.kanade.tachiyomi.multisrc.mangaraw.MangaRaw -import eu.kanade.tachiyomi.network.GET import okhttp3.Request class SyoSetu : MangaRaw("SyoSetu", "https://syosetu.top") { diff --git a/multisrc/overrides/multichan/henchan/src/HenChan.kt b/multisrc/overrides/multichan/henchan/src/HenChan.kt index e6f8538c9..e2424b7e2 100644 --- a/multisrc/overrides/multichan/henchan/src/HenChan.kt +++ b/multisrc/overrides/multichan/henchan/src/HenChan.kt @@ -10,18 +10,18 @@ import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.util.asJsoup -import java.net.URL -import java.text.SimpleDateFormat -import java.util.Date -import java.util.Locale import okhttp3.Headers import okhttp3.Request import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element import rx.Observable +import java.net.URL +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale -class HenChan : MultiChan("HenChan", "https://y.hentaichan.live", "ru"){ +class HenChan : MultiChan("HenChan", "https://y.hentaichan.live", "ru") { override val id: Long = 5504588601186153612 diff --git a/multisrc/overrides/multichan/mangachan/src/MangaChan.kt b/multisrc/overrides/multichan/mangachan/src/MangaChan.kt index 92e0ee3cc..1a5612c88 100644 --- a/multisrc/overrides/multichan/mangachan/src/MangaChan.kt +++ b/multisrc/overrides/multichan/mangachan/src/MangaChan.kt @@ -6,7 +6,7 @@ import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList import okhttp3.Request -class MangaChan : MultiChan("MangaChan", "https://manga-chan.me", "ru"){ +class MangaChan : MultiChan("MangaChan", "https://manga-chan.me", "ru") { override val id: Long = 7 diff --git a/multisrc/overrides/multichan/yaoichan/src/YaoiChan.kt b/multisrc/overrides/multichan/yaoichan/src/YaoiChan.kt index 7daa032a2..9646b705c 100644 --- a/multisrc/overrides/multichan/yaoichan/src/YaoiChan.kt +++ b/multisrc/overrides/multichan/yaoichan/src/YaoiChan.kt @@ -6,7 +6,7 @@ import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList import okhttp3.Request -class YaoiChan : MultiChan("YaoiChan", "https://yaoi-chan.me", "ru"){ +class YaoiChan : MultiChan("YaoiChan", "https://yaoi-chan.me", "ru") { override val id: Long = 2466512768990363955 diff --git a/multisrc/overrides/mymangacms/truyentranhlh/src/TruyenTranhLH.kt b/multisrc/overrides/mymangacms/truyentranhlh/src/TruyenTranhLH.kt index 182c40d28..c8f6c42bb 100644 --- a/multisrc/overrides/mymangacms/truyentranhlh/src/TruyenTranhLH.kt +++ b/multisrc/overrides/mymangacms/truyentranhlh/src/TruyenTranhLH.kt @@ -65,4 +65,3 @@ class TruyenTranhLH : MyMangaCMS("TruyenTranhLH", "https://truyentranhlh.net", " Genre("Dark Fantasy", 57), ) } - diff --git a/multisrc/overrides/wpmangareader/sushiscan/src/SushiScan.kt b/multisrc/overrides/wpmangareader/sushiscan/src/SushiScan.kt index 2eab1bbaf..0207ad436 100644 --- a/multisrc/overrides/wpmangareader/sushiscan/src/SushiScan.kt +++ b/multisrc/overrides/wpmangareader/sushiscan/src/SushiScan.kt @@ -5,7 +5,6 @@ import eu.kanade.tachiyomi.source.model.SManga import java.text.SimpleDateFormat import java.util.Locale - class SushiScan : WPMangaReader("Sushi-Scan", "https://sushiscan.su", "fr", dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale.FRENCH)) { override val altName = "Nom alternatif : " override val seriesStatusSelector = ".tsinfo .imptdt:contains(Statut)" diff --git a/multisrc/overrides/wpmangastream/mangaproz/src/MangaPro.kt b/multisrc/overrides/wpmangastream/mangaproz/src/MangaPro.kt index ea5a0de47..c1fb207f0 100644 --- a/multisrc/overrides/wpmangastream/mangaproz/src/MangaPro.kt +++ b/multisrc/overrides/wpmangastream/mangaproz/src/MangaPro.kt @@ -33,7 +33,8 @@ class MangaPro : WPMangaStream("Manga Pro", "https://mangaprotm.com", "ar") { chapter.setUrlWithoutDomain("") chapter.name = if (urlElement.select("span.chapternum") - .isNotEmpty()) urlElement.select("span.chapternum").text() else urlElement.text() + .isNotEmpty() + ) urlElement.select("span.chapternum").text() else urlElement.text() chapter.name = chapter.name.replace("-*free".toRegex(RegexOption.IGNORE_CASE), "") chapter.date_upload = element.select("span.rightoff, time, span.chapterdate").firstOrNull()?.text() diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/grouple/GroupLe.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/grouple/GroupLe.kt index 557b4d8ce..2fa7672e3 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/grouple/GroupLe.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/grouple/GroupLe.kt @@ -7,7 +7,6 @@ import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.asObservableSuccess import eu.kanade.tachiyomi.network.interceptor.rateLimit import eu.kanade.tachiyomi.source.ConfigurableSource -import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.Page @@ -16,7 +15,6 @@ import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.ParsedHttpSource import eu.kanade.tachiyomi.util.asJsoup import okhttp3.Headers -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response @@ -259,7 +257,7 @@ abstract class GroupLe( } if (!url.contains("://")) url = "https:$url" - pages.add(Page(i++, "", url.replace("//resh","//h"))) + pages.add(Page(i++, "", url.replace("//resh", "//h"))) } return pages } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/grouple/GroupLeGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/grouple/GroupLeGenerator.kt index f5938ba19..e4f9b6516 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/grouple/GroupLeGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/grouple/GroupLeGenerator.kt @@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.multisrc.grouple import generator.ThemeSourceData.SingleLang import generator.ThemeSourceGenerator -class GroupLeGenerator: ThemeSourceGenerator { +class GroupLeGenerator : ThemeSourceGenerator { override val themePkg = "grouple" @@ -14,7 +14,7 @@ class GroupLeGenerator: ThemeSourceGenerator { override val sources = listOf( SingleLang("ReadManga", "https://readmanga.live", "ru", overrideVersionCode = 46), SingleLang("MintManga", "https://mintmanga.live", "ru", overrideVersionCode = 46), - SingleLang("AllHentai", "http://23.allhen.online", "ru",isNsfw = true, overrideVersionCode = 22), + SingleLang("AllHentai", "http://23.allhen.online", "ru", isNsfw = true, overrideVersionCode = 22), SingleLang("SelfManga", "https://selfmanga.live", "ru", overrideVersionCode = 22), SingleLang("RuMIX", "https://rumix.me", "ru", overrideVersionCode = 1) ) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGenerator.kt index 7a0c45089..565ec94f1 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGenerator.kt @@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.multisrc.libgroup import generator.ThemeSourceData.SingleLang import generator.ThemeSourceGenerator -class LibGenerator: ThemeSourceGenerator { +class LibGenerator : ThemeSourceGenerator { override val themePkg = "libgroup" @@ -13,8 +13,8 @@ class LibGenerator: ThemeSourceGenerator { override val sources = listOf( SingleLang("MangaLib", "https://mangalib.me", "ru", overrideVersionCode = 74), - SingleLang("HentaiLib", "https://hentailib.me", "ru",isNsfw = true, overrideVersionCode = 19), - SingleLang("YaoiLib", "https://yaoilib.me", "ru",isNsfw = true, overrideVersionCode = 1) + SingleLang("HentaiLib", "https://hentailib.me", "ru", isNsfw = true, overrideVersionCode = 19), + SingleLang("YaoiLib", "https://yaoilib.me", "ru", isNsfw = true, overrideVersionCode = 1) ) companion object { diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGroup.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGroup.kt index 344fca5d5..52a2c4f93 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGroup.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/libgroup/LibGroup.kt @@ -19,12 +19,6 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.asJsoup -import java.io.IOException -import java.text.SimpleDateFormat -import java.util.Locale -import java.util.concurrent.TimeUnit -import kotlin.math.absoluteValue -import kotlin.random.Random import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonArray @@ -48,7 +42,12 @@ import rx.Observable import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy - +import java.io.IOException +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit +import kotlin.math.absoluteValue +import kotlin.random.Random abstract class LibGroup( override val name: String, @@ -83,7 +82,7 @@ abstract class LibGroup( .addInterceptor { chain -> val response = chain.proceed(chain.request()) if (response.code == 419) - throw IOException("HTTP error ${response.code}. Для завершения авторизации необходимо перезапустить приложение с полной остановкой.") + throw IOException("HTTP error ${response.code}. Для завершения авторизации необходимо перезапустить приложение с полной остановкой.") return@addInterceptor response } .build() @@ -248,11 +247,11 @@ abstract class LibGroup( SManga.LICENSED } else when { - StatusTranslate.contains("завершен" ) && StatusTitle.contains("приостановлен" ) || StatusTranslate.contains("заморожен" ) || StatusTranslate.contains("заброшен" ) -> SManga.ON_HIATUS - StatusTranslate.contains("завершен" ) && StatusTitle.contains("выпуск прекращён" ) -> SManga.CANCELLED - StatusTranslate.contains("продолжается" ) -> SManga.ONGOING - StatusTranslate.contains("завершен" ) -> SManga.COMPLETED - else -> when (StatusTitle){ + StatusTranslate.contains("завершен") && StatusTitle.contains("приостановлен") || StatusTranslate.contains("заморожен") || StatusTranslate.contains("заброшен") -> SManga.ON_HIATUS + StatusTranslate.contains("завершен") && StatusTitle.contains("выпуск прекращён") -> SManga.CANCELLED + StatusTranslate.contains("продолжается") -> SManga.ONGOING + StatusTranslate.contains("завершен") -> SManga.COMPLETED + else -> when (StatusTitle) { "онгоинг" -> SManga.ONGOING "анонс" -> SManga.ONGOING "завершён" -> SManga.COMPLETED @@ -334,7 +333,7 @@ abstract class LibGroup( } private fun sortChaptersByTranslator - (sortingList: String?, chaptersList: JsonArray?, slug: String, branches: List): List? { + (sortingList: String?, chaptersList: JsonArray?, slug: String, branches: List): List? { var chapters: List? = null val volume = "(?<=/v)[0-9]+(?=/c[0-9]+)".toRegex() val tempChaptersList = mutableListOf() @@ -372,7 +371,7 @@ abstract class LibGroup( } private fun chapterFromElement - (chapterItem: JsonElement, sortingList: String?, slug: String, teamIdParam: Int? = null, branches: List? = null, teams: List? = null, chaptersList: JsonArray? = null): SChapter { + (chapterItem: JsonElement, sortingList: String?, slug: String, teamIdParam: Int? = null, branches: List? = null, teams: List? = null, chaptersList: JsonArray? = null): SChapter { val chapter = SChapter.create() val volume = chapterItem.jsonObject["chapter_volume"]!!.jsonPrimitive.int @@ -417,7 +416,7 @@ abstract class LibGroup( override fun pageListParse(response: Response): List { val document = response.asJsoup() - //redirect Регистрация 18+ + // redirect Регистрация 18+ val redirect = document.html() if (!redirect.contains("window.__info")) { if (redirect.contains("auth-layout")) { diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/multichan/ChanGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/multichan/ChanGenerator.kt index 017e78376..238641f9c 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/multichan/ChanGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/multichan/ChanGenerator.kt @@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.multisrc.multichan import generator.ThemeSourceData.SingleLang import generator.ThemeSourceGenerator -class ChanGenerator: ThemeSourceGenerator { +class ChanGenerator : ThemeSourceGenerator { override val themePkg = "multichan" @@ -13,8 +13,8 @@ class ChanGenerator: ThemeSourceGenerator { override val sources = listOf( SingleLang("MangaChan", "https://manga-chan.me", "ru", overrideVersionCode = 14), - SingleLang("HenChan", "https://y.hentaichan.live", "ru",isNsfw = true, overrideVersionCode = 35), - SingleLang("YaoiChan", "https://yaoi-chan.me", "ru",isNsfw = true, overrideVersionCode = 4) + SingleLang("HenChan", "https://y.hentaichan.live", "ru", isNsfw = true, overrideVersionCode = 35), + SingleLang("YaoiChan", "https://yaoi-chan.me", "ru", isNsfw = true, overrideVersionCode = 4) ) companion object { diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/multichan/MultiChan.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/multichan/MultiChan.kt index 42192adad..b3f544349 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/multichan/MultiChan.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/multichan/MultiChan.kt @@ -2,8 +2,6 @@ package eu.kanade.tachiyomi.multisrc.multichan import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.interceptor.rateLimit -import eu.kanade.tachiyomi.source.model.Filter -import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mymangacms/MyMangaCMS.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mymangacms/MyMangaCMS.kt index e75639780..81f7d4bfd 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mymangacms/MyMangaCMS.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mymangacms/MyMangaCMS.kt @@ -115,9 +115,11 @@ abstract class MyMangaCMS( override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable { return when { query.startsWith(PREFIX_URL_SEARCH) -> { - fetchMangaDetails(SManga.create().apply { - url = query.removePrefix(PREFIX_URL_SEARCH).trim().replace(baseUrl, "") - }) + fetchMangaDetails( + SManga.create().apply { + url = query.removePrefix(PREFIX_URL_SEARCH).trim().replace(baseUrl, "") + } + ) .map { MangasPage(listOf(it), false) } } else -> super.fetchSearchManga(page, query, filters) @@ -260,7 +262,8 @@ abstract class MyMangaCMS( val document = response.asJsoup() val originalScanlator = document.select("div.fantrans-value a") val scanlator: String? = if (originalScanlator.isEmpty() || - originalScanlator.first().text().trim().lowercase() == "đang cập nhật") { + originalScanlator.first().text().trim().lowercase() == "đang cập nhật" + ) { null } else { originalScanlator.first().text().trim() diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mymangacms/MyMangaCMSUrlActivity.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mymangacms/MyMangaCMSUrlActivity.kt index 0f3d43f3e..a1bf9e32d 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mymangacms/MyMangaCMSUrlActivity.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mymangacms/MyMangaCMSUrlActivity.kt @@ -13,11 +13,13 @@ class MyMangaCMSUrlActivity : Activity() { val pathSegments = intent?.data?.pathSegments if (pathSegments != null && pathSegments.size > 1) { try { - startActivity(Intent().apply { - action = "eu.kanade.tachiyomi.SEARCH" - putExtra("query", "${MyMangaCMS.PREFIX_URL_SEARCH}${intent?.data?.path}") - putExtra("filter", packageName) - }) + startActivity( + Intent().apply { + action = "eu.kanade.tachiyomi.SEARCH" + putExtra("query", "${MyMangaCMS.PREFIX_URL_SEARCH}${intent?.data?.path}") + putExtra("filter", packageName) + } + ) } catch (e: ActivityNotFoundException) { Log.e("MyMangaCMSUrlActivity", e.toString()) } diff --git a/multisrc/src/main/java/generator/IntelijConfigurationGeneratorMain.kt b/multisrc/src/main/java/generator/IntelijConfigurationGeneratorMain.kt index f8f875b21..ee6476053 100644 --- a/multisrc/src/main/java/generator/IntelijConfigurationGeneratorMain.kt +++ b/multisrc/src/main/java/generator/IntelijConfigurationGeneratorMain.kt @@ -31,28 +31,18 @@ fun main(args: Array) { val intellijConfStr = """ - - """.trimIndent() file.writeText(intellijConfStr) - - // Find Java class and extract method lists - Class.forName("eu/kanade/tachiyomi/multisrc/$themeSource/$generatorClass".replace("/", ".").substringBefore(".kt")) - .methods - .find { it.name == "main" } + file.appendText("\n") } } }