Tachidesk: sync implementation with >= v0.5.0 (#9132)
This commit is contained in:
parent
234a516389
commit
585b4c1968
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Tachidesk'
|
||||
pkgNameSuffix = 'all.tachidesk'
|
||||
extClass = '.Tachidesk'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
containsNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,18 @@ data class SourceDataClass(
|
|||
val name: String?,
|
||||
val lang: String?,
|
||||
val iconUrl: String?,
|
||||
|
||||
/** The Source provides a latest listing */
|
||||
val supportsLatest: Boolean?,
|
||||
val isConfigurable: Boolean?
|
||||
|
||||
/** The Source implements [ConfigurableSource] */
|
||||
val isConfigurable: Boolean?,
|
||||
|
||||
/** The Source class has a @Nsfw annotation */
|
||||
val isNsfw: Boolean?,
|
||||
|
||||
/** A nicer version of [name] */
|
||||
val displayName: String?,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
|
@ -26,13 +36,15 @@ data class MangaDataClass(
|
|||
val artist: String? = null,
|
||||
val author: String? = null,
|
||||
val description: String? = null,
|
||||
val genre: String? = null,
|
||||
val genre: List<String> = emptyList(),
|
||||
val status: String = "UNKNOWN",
|
||||
val inLibrary: Boolean = false,
|
||||
val source: SourceDataClass? = null,
|
||||
val meta: Map<String, String> = emptyMap(),
|
||||
|
||||
val freshData: Boolean = false
|
||||
val realUrl: String? = null,
|
||||
|
||||
val freshData: Boolean = false,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
|
|
|
@ -217,12 +217,13 @@ class Tachidesk : ConfigurableSource, HttpSource() {
|
|||
// ------------- Util -------------
|
||||
|
||||
private fun MangaDataClass.toSManga() = SManga.create().also {
|
||||
it.title = title
|
||||
it.url = id.toString()
|
||||
it.title = title
|
||||
it.thumbnail_url = "$baseUrl$thumbnailUrl"
|
||||
it.artist = artist
|
||||
it.author = author
|
||||
it.description = description
|
||||
it.genre = genre.joinToString(", ")
|
||||
it.status = when (status) {
|
||||
"ONGOING" -> SManga.ONGOING
|
||||
"COMPLETED" -> SManga.COMPLETED
|
||||
|
|
Loading…
Reference in New Issue