Add manga1000 (#14589)
* Add manga1000. * Remove unnecessary space. Co-authored-by: TheKingTermux <50316075+TheKingTermux@users.noreply.github.com> Co-authored-by: mao09 <71811256+mao09@users.noreply.github.com>
This commit is contained in:
parent
474ed09cc9
commit
7e10b61cff
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
multisrc/overrides/fmreader/manga1000/res/web_hi_res_512.png
Normal file
BIN
multisrc/overrides/fmreader/manga1000/res/web_hi_res_512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
40
multisrc/overrides/fmreader/manga1000/src/Manga1000.kt
Normal file
40
multisrc/overrides/fmreader/manga1000/src/Manga1000.kt
Normal file
@ -0,0 +1,40 @@
|
||||
package eu.kanade.tachiyomi.extension.ja.manga1000
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fmreader.FMReader
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import org.jsoup.nodes.Element
|
||||
import java.util.Calendar
|
||||
|
||||
class Manga1000 : FMReader("Manga1000", "https://manga1000.top", "ja") {
|
||||
override fun chapterFromElement(element: Element, mangaTitle: String): SChapter {
|
||||
return SChapter.create().apply {
|
||||
element.let {
|
||||
setUrlWithoutDomain(it.attr("abs:href"))
|
||||
name = it.attr("title")
|
||||
}
|
||||
|
||||
date_upload = element.select(chapterTimeSelector)
|
||||
.let { if (it.hasText()) parseChapterDate(it.text()) else 0 }
|
||||
}
|
||||
}
|
||||
|
||||
private fun parseChapterDate(date: String): Long {
|
||||
val value = date.split(' ')[dateValueIndex].toInt()
|
||||
val chapterDate = Calendar.getInstance().apply {
|
||||
set(Calendar.SECOND, 0)
|
||||
set(Calendar.MILLISECOND, 0)
|
||||
}
|
||||
|
||||
when (date.split(' ')[dateWordIndex]) {
|
||||
"mins", "minutes" -> chapterDate.add(Calendar.MINUTE, value * -1)
|
||||
"hours" -> chapterDate.add(Calendar.HOUR_OF_DAY, value * -1)
|
||||
"days" -> chapterDate.add(Calendar.DATE, value * -1)
|
||||
"weeks" -> chapterDate.add(Calendar.DATE, value * 7 * -1)
|
||||
"months" -> chapterDate.add(Calendar.MONTH, value * -1)
|
||||
"years" -> chapterDate.add(Calendar.YEAR, value * -1)
|
||||
else -> return 0
|
||||
}
|
||||
|
||||
return chapterDate.timeInMillis
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ class FMReaderGenerator : ThemeSourceGenerator {
|
||||
SingleLang("Manhwa18", "https://manhwa18.com", "en", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Say Truyen", "https://saytruyen.net", "vi", overrideVersionCode = 2),
|
||||
SingleLang("WeLoveManga", "https://weloma.art", "ja", pkgName = "rawlh", overrideVersionCode = 4),
|
||||
SingleLang("Manga1000", "https://manga1000.top", "ja"),
|
||||
)
|
||||
|
||||
companion object {
|
||||
|
Loading…
x
Reference in New Issue
Block a user