Add SMA-17 to SilentMangaAudition. (#13649)
This commit is contained in:
parent
9a15904cab
commit
0710868ecc
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Silent Manga Audition'
|
||||
pkgNameSuffix = 'en.silentmangaaudition'
|
||||
extClass = '.SilentMangaAudition'
|
||||
extVersionCode = 4
|
||||
extVersionCode = 5
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -1,15 +1,34 @@
|
|||
package eu.kanade.tachiyomi.extension.en.silentmangaaudition
|
||||
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
|
||||
data class SmaEntry(
|
||||
val name: String,
|
||||
val url: String,
|
||||
val chapterListUrl: String,
|
||||
val thumbnailUrl: String
|
||||
)
|
||||
) {
|
||||
|
||||
fun toSManga(index: Int): SManga = SManga.create().apply {
|
||||
title = name
|
||||
author = "Various artists"
|
||||
status = SManga.COMPLETED
|
||||
description = "The theme is… " + name.substringAfter(" ") + "."
|
||||
thumbnail_url = thumbnailUrl
|
||||
url = "${this@SmaEntry.url},$chapterListUrl,$index"
|
||||
initialized = true
|
||||
}
|
||||
}
|
||||
|
||||
val SMA_ENTRIES = listOf(
|
||||
SmaEntry(
|
||||
"SMA-16 “MOMENTS of FEAR, JOY, or LOVE",
|
||||
"SMA-17 “MOMENTS of HASTE, RAGE or SMILES”",
|
||||
"/sma17-silent-manga-audition-2022-results-announcement",
|
||||
"/v/sma17/bones-by-rimui/?lang=en",
|
||||
"https://www.manga-audition.com/wp/wp-content/themes/gridlove-child/assets/img/award-result/sma17/header_sp.png"
|
||||
),
|
||||
SmaEntry(
|
||||
"SMA-16 “MOMENTS of FEAR, JOY, or LOVE”",
|
||||
"/sma16-silent-manga-audition-2021-results-announcement",
|
||||
"/v/sma16/lacrimosa-by-laica-chrose/?lang=en",
|
||||
"https://www.manga-audition.com/wp/wp-content/uploads/2021/11/hero_sp_new.jpg"
|
||||
|
|
|
@ -48,7 +48,6 @@ class SilentMangaAudition : HttpSource() {
|
|||
val index = manga.url.substringAfterLast(",").toInt()
|
||||
val entry = SMA_ENTRIES[index]
|
||||
|
||||
// Fill all the data again because in backup only the title and the url are stored.
|
||||
return Observable.just(entry.toSManga(index))
|
||||
}
|
||||
|
||||
|
@ -103,15 +102,6 @@ class SilentMangaAudition : HttpSource() {
|
|||
return GET(page.imageUrl!!, newHeaders)
|
||||
}
|
||||
|
||||
private fun SmaEntry.toSManga(index: Int): SManga = SManga.create().apply {
|
||||
title = name
|
||||
author = "Various artists"
|
||||
status = SManga.COMPLETED
|
||||
description = "The theme is… " + name.substringAfter(" ") + "."
|
||||
thumbnail_url = thumbnailUrl
|
||||
url = "${this@toSManga.url},$chapterListUrl,$index"
|
||||
}
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request = throw UnsupportedOperationException("Not used")
|
||||
|
||||
override fun popularMangaParse(response: Response): MangasPage = throw UnsupportedOperationException("Not used")
|
||||
|
@ -130,6 +120,6 @@ class SilentMangaAudition : HttpSource() {
|
|||
private const val SMACMAG_URL = "https://smacmag.net"
|
||||
|
||||
private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " +
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue