Add Raindrop Fansub (#2386)
* Add Zenith Scans * Add Raindrop Fansub * renamed * revised * Remove unnecessary overrides, sort chapters * Make chapterListParse more concise * Make chapterListParse more more concise --------- Co-authored-by: hasanturkylmz <hasanturkylmz@outlook.com> Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
This commit is contained in:
parent
a6baf39b2e
commit
964adc3624
|
@ -0,0 +1,10 @@
|
|||
ext {
|
||||
extName = 'Raindrop Fansub'
|
||||
extClass = '.RaindropFansub'
|
||||
themePkg = 'mangathemesia'
|
||||
baseUrl = 'https://www.raindropteamfan.com'
|
||||
isNsfw = false
|
||||
overrideVersionCode = 0
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,39 @@
|
|||
package eu.kanade.tachiyomi.extension.tr.raindropfansub
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import okhttp3.Response
|
||||
import org.jsoup.Jsoup
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class RaindropFansub : MangaThemesia(
|
||||
"Raindrop Fansub",
|
||||
"https://www.raindropteamfan.com",
|
||||
"tr",
|
||||
dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("tr")),
|
||||
) {
|
||||
override val seriesTypeSelector = ".tsinfo .imptdt:contains(Tür) a"
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
// "İlk Bölüm" points to the first chapter, but is often wrong on the site
|
||||
// We look at "Son Bölüm" to find the last chapter and sort accordingly
|
||||
val document = Jsoup.parse(response.peekBody(Long.MAX_VALUE).string())
|
||||
val chapters = super.chapterListParse(response)
|
||||
|
||||
val lastChapterUrl = document
|
||||
.selectFirst("a:has(.epcurlast)")
|
||||
?.attr("href")
|
||||
?.let {
|
||||
val dummyChapter = SChapter.create()
|
||||
dummyChapter.setUrlWithoutDomain(it)
|
||||
dummyChapter.url
|
||||
}
|
||||
|
||||
return when (lastChapterUrl) {
|
||||
chapters.first().url -> chapters
|
||||
chapters.last().url -> chapters.reversed()
|
||||
else -> chapters.reversed()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue