Tachidesk: sync implementation with >= v0.5.0 (#9132)

This commit is contained in:
Aria Moradi 2021-09-19 21:47:35 +04:30 committed by GitHub
parent 234a516389
commit 585b4c1968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 5 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Tachidesk'
pkgNameSuffix = 'all.tachidesk'
extClass = '.Tachidesk'
extVersionCode = 2
extVersionCode = 3
containsNsfw = true
}

View File

@ -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

View File

@ -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