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 {
|
ext {
|
||||||
extName = 'LANraragi'
|
extName = 'LANraragi'
|
||||||
extClass = '.LANraragiFactory'
|
extClass = '.LANraragiFactory'
|
||||||
extVersionCode = 17
|
extVersionCode = 18
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -7,6 +7,7 @@ data class Archive(
|
||||||
val arcid: String,
|
val arcid: String,
|
||||||
val isnew: String,
|
val isnew: String,
|
||||||
val tags: String?,
|
val tags: String?,
|
||||||
|
val summary: String?,
|
||||||
val title: String,
|
val title: String,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -25,7 +26,6 @@ data class ArchiveSearchResult(
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Category(
|
data class Category(
|
||||||
val id: String,
|
val id: String,
|
||||||
val last_used: String,
|
|
||||||
val name: String,
|
val name: String,
|
||||||
val pinned: 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 {
|
private fun archiveToSManga(archive: Archive) = SManga.create().apply {
|
||||||
url = "/reader?id=${archive.arcid}"
|
url = "/reader?id=${archive.arcid}"
|
||||||
title = archive.title
|
title = archive.title
|
||||||
description = archive.title
|
description = if (archive.summary.isNullOrBlank()) archive.title else archive.summary
|
||||||
thumbnail_url = getThumbnailUri(archive.arcid)
|
thumbnail_url = getThumbnailUri(archive.arcid)
|
||||||
genre = archive.tags?.replace(",", ", ")
|
genre = archive.tags?.replace(",", ", ")
|
||||||
artist = getArtist(archive.tags)
|
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>> {
|
private fun getCategoryPairs(categories: List<Category>): Array<Pair<String?, String>> {
|
||||||
// Empty pair to disable. Sort by pinned status then name for convenience.
|
// 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 "
|
val pin = "\uD83D\uDCCC "
|
||||||
|
|
||||||
// Maintain categories sync for next FilterList reset. If there's demand for it, it's now
|
// Maintain categories sync for next FilterList reset.
|
||||||
// possible to sort by last_used similar to the web client. Maybe an option toggle?
|
|
||||||
getCategories()
|
getCategories()
|
||||||
|
|
||||||
return listOf(Pair("", ""))
|
return listOf(Pair("", ""))
|
||||||
|
|
Loading…
Reference in New Issue