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