ScanManga: add scanlators to chapter list (#6491)
This commit is contained in:
parent
277ca48f99
commit
0e39cec5b8
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'Scan-Manga'
|
extName = 'Scan-Manga'
|
||||||
pkgNameSuffix = 'fr.scanmanga'
|
pkgNameSuffix = 'fr.scanmanga'
|
||||||
extClass = '.ScanManga'
|
extClass = '.ScanManga'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
containsNsfw = true
|
containsNsfw = true
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import eu.kanade.tachiyomi.source.model.Page
|
|||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
@ -175,12 +176,17 @@ class ScanManga : ParsedHttpSource() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Chapters
|
// Chapters
|
||||||
override fun chapterListSelector() = "div.texte_volume_manga ul li.chapitre div.chapitre_nom a"
|
override fun chapterListSelector() = throw Exception("Not used")
|
||||||
|
override fun chapterFromElement(element: Element): SChapter = throw Exception("Not used")
|
||||||
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
|
val document = response.asJsoup()
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
return document.select("div.texte_volume_manga ul li.chapitre div.chapitre_nom a").map {
|
||||||
return SChapter.create().apply {
|
SChapter.create().apply {
|
||||||
name = element.text()
|
name = it.text()
|
||||||
setUrlWithoutDomain(element.attr("href"))
|
setUrlWithoutDomain(it.attr("href"))
|
||||||
|
scanlator = document.select("li[itemprop=\"translator\"] a").joinToString { it.text() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user