LANraragi: Category fix + Summary (#4692)
* LRR: Drop last_used to fix categories * LRR: Summary field Maintain old behavior in case someone relied on it. Tanks may encourage a standard in the future.
This commit is contained in:
parent
89a64d0b80
commit
f297323f42
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'LANraragi'
|
||||
extClass = '.LANraragiFactory'
|
||||
extVersionCode = 17
|
||||
extVersionCode = 18
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -7,6 +7,7 @@ data class Archive(
|
|||
val arcid: String,
|
||||
val isnew: String,
|
||||
val tags: String?,
|
||||
val summary: String?,
|
||||
val title: String,
|
||||
)
|
||||
|
||||
|
@ -25,7 +26,6 @@ data class ArchiveSearchResult(
|
|||
@Serializable
|
||||
data class Category(
|
||||
val id: String,
|
||||
val last_used: String,
|
||||
val name: String,
|
||||
val pinned: String,
|
||||
)
|
||||
|
|
|
@ -242,7 +242,7 @@ open class LANraragi(private val suffix: String = "") : ConfigurableSource, Unme
|
|||
private fun archiveToSManga(archive: Archive) = SManga.create().apply {
|
||||
url = "/reader?id=${archive.arcid}"
|
||||
title = archive.title
|
||||
description = archive.title
|
||||
description = if (archive.summary.isNullOrBlank()) archive.title else archive.summary
|
||||
thumbnail_url = getThumbnailUri(archive.arcid)
|
||||
genre = archive.tags?.replace(",", ", ")
|
||||
artist = getArtist(archive.tags)
|
||||
|
@ -406,12 +406,10 @@ open class LANraragi(private val suffix: String = "") : ConfigurableSource, Unme
|
|||
|
||||
private fun getCategoryPairs(categories: List<Category>): Array<Pair<String?, String>> {
|
||||
// Empty pair to disable. Sort by pinned status then name for convenience.
|
||||
// Web client sort is pinned > last_used but reflects between page changes.
|
||||
|
||||
val pin = "\uD83D\uDCCC "
|
||||
|
||||
// Maintain categories sync for next FilterList reset. If there's demand for it, it's now
|
||||
// possible to sort by last_used similar to the web client. Maybe an option toggle?
|
||||
// Maintain categories sync for next FilterList reset.
|
||||
getCategories()
|
||||
|
||||
return listOf(Pair("", ""))
|
||||
|
|
Loading…
Reference in New Issue