omega scans: filter patreon chapters (#16609)
This commit is contained in:
parent
5729fb1667
commit
78b9147c35
|
@ -220,7 +220,7 @@ abstract class HeanCms(
|
|||
|
||||
val seriesDetails = seriesSlugMap?.get(seriesSlug)
|
||||
val currentSlug = seriesDetails?.slug ?: seriesSlug
|
||||
val currentStatus = seriesDetails?.status ?: SManga.UNKNOWN
|
||||
val currentStatus = seriesDetails?.status ?: manga.status
|
||||
|
||||
val apiHeaders = headersBuilder()
|
||||
.add("Accept", ACCEPT_JSON)
|
||||
|
@ -248,6 +248,7 @@ abstract class HeanCms(
|
|||
val currentTimestamp = System.currentTimeMillis()
|
||||
|
||||
return result.chapters.orEmpty()
|
||||
.filterNot { it.price == 1 }
|
||||
.map { it.toSChapter(seriesSlug, dateFormat) }
|
||||
.filter { it.date_upload <= currentTimestamp }
|
||||
.reversed()
|
||||
|
|
|
@ -91,6 +91,7 @@ data class HeanCmsChapterDto(
|
|||
@SerialName("chapter_slug") val slug: String,
|
||||
val index: String,
|
||||
@SerialName("created_at") val createdAt: String,
|
||||
val price: Int? = null,
|
||||
) {
|
||||
|
||||
fun toSChapter(seriesSlug: String, dateFormat: SimpleDateFormat): SChapter = SChapter.create().apply {
|
||||
|
|
|
@ -12,7 +12,7 @@ class HeanCmsGenerator : ThemeSourceGenerator {
|
|||
override val baseVersionCode: Int = 13
|
||||
|
||||
override val sources = listOf(
|
||||
SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true, overrideVersionCode = 16),
|
||||
SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true, overrideVersionCode = 17),
|
||||
SingleLang("Reaper Scans", "https://reaperscans.net", "pt-BR", overrideVersionCode = 35),
|
||||
SingleLang("YugenMangas", "https://yugenmangas.com", "es", isNsfw = true, overrideVersionCode = 1),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue