Add new madara source (#13808)
* Add new madara source * Update Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>
This commit is contained in:
parent
f6c8f8135a
commit
2d22a17f7e
|
@ -0,0 +1,34 @@
|
|||
package eu.kanade.tachiyomi.extension.es.chunchunmarutranslations
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class ChunchunmaruTranslations : Madara(
|
||||
"Chunchunmaru Translations",
|
||||
"https://chunchunmarutl.com",
|
||||
"es",
|
||||
SimpleDateFormat("dd 'de' MMMMM 'de' yyyy", Locale("es"))
|
||||
) {
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/manga/page/$page/?m_orderby=views", headers)
|
||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/manga/page/$page/?m_orderby=latest", headers)
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
return super.chapterFromElement(element).apply {
|
||||
chapter_number = name.split(" ").getOrNull(1)?.toFloatOrNull() ?: -1f
|
||||
}
|
||||
}
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
// Sorting list because they are in packs
|
||||
return super.chapterListParse(response).sortedBy {
|
||||
it.chapter_number
|
||||
}
|
||||
}
|
||||
}
|
|
@ -501,6 +501,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("مانجا عرب تيم Manga Arab Team", "https://mangaarbteam.com", "ar", className = "MangaArabTeam", overrideVersionCode = 1),
|
||||
SingleLang("مانجا ليك", "https://mangalek.com", "ar", className = "Mangalek", overrideVersionCode = 1),
|
||||
SingleLang("مانجا لينك", "https://mangalink.io", "ar", className = "MangaLinkio", overrideVersionCode = 2),
|
||||
SingleLang("Chunchunmaru Translations", "https://chunchunmarutl.com", "es", className = "ChunchunmaruTranslations"),
|
||||
)
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in New Issue