mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-25 11:42:47 +01:00
GravureBlogger: make categories optional (#1401)
* GravureBlogger: make categories optional * remove author field only contains source name
This commit is contained in:
parent
cc5696dd7a
commit
bfe5f4217a
@ -2,4 +2,4 @@ plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 1
|
||||
baseVersionCode = 2
|
||||
|
@ -4,12 +4,12 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class BloggerDto(
|
||||
class BloggerDto(
|
||||
val feed: BloggerFeedDto,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class BloggerFeedDto(
|
||||
class BloggerFeedDto(
|
||||
@SerialName("openSearch\$totalResults") val totalResults: BloggerTextDto,
|
||||
@SerialName("openSearch\$startIndex") val startIndex: BloggerTextDto,
|
||||
@SerialName("openSearch\$itemsPerPage") val itemsPerPage: BloggerTextDto,
|
||||
@ -18,32 +18,26 @@ data class BloggerFeedDto(
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class BloggerFeedEntryDto(
|
||||
class BloggerFeedEntryDto(
|
||||
val published: BloggerTextDto,
|
||||
val category: List<BloggerCategoryDto>,
|
||||
val category: List<BloggerCategoryDto>? = emptyList(),
|
||||
val title: BloggerTextDto,
|
||||
val content: BloggerTextDto,
|
||||
val link: List<BloggerLinkDto>,
|
||||
val author: List<BloggerAuthorDto>,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class BloggerLinkDto(
|
||||
class BloggerLinkDto(
|
||||
val rel: String,
|
||||
val href: String,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class BloggerCategoryDto(
|
||||
class BloggerCategoryDto(
|
||||
val term: String,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class BloggerAuthorDto(
|
||||
val name: BloggerTextDto,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class BloggerTextDto(
|
||||
class BloggerTextDto(
|
||||
@SerialName("\$t") val t: String,
|
||||
)
|
||||
|
@ -1,6 +1,5 @@
|
||||
package eu.kanade.tachiyomi.multisrc.gravureblogger
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Build
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
@ -23,7 +22,6 @@ import uy.kohesive.injekt.injectLazy
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
@SuppressLint("ObsoleteSdkInt")
|
||||
abstract class GravureBlogger(
|
||||
override val name: String,
|
||||
override val baseUrl: String,
|
||||
@ -61,7 +59,7 @@ abstract class GravureBlogger(
|
||||
setUrlWithoutDomain(entry.link.first { it.rel == "alternate" }.href + "#${entry.published.t}")
|
||||
title = entry.title.t
|
||||
thumbnail_url = content.selectFirst("img")?.absUrl("src")
|
||||
genre = entry.category.joinToString { it.term }
|
||||
genre = entry.category?.joinToString { it.term }
|
||||
status = SManga.COMPLETED
|
||||
update_strategy = UpdateStrategy.ONLY_FETCH_ONCE
|
||||
initialized = true
|
||||
|
Loading…
Reference in New Issue
Block a user