[Komga] fix restoring backup & tags in filter panel (#6736)
* fix: set full url for manga so restoring a backup can work * fix: only show series tags in the filter panel
This commit is contained in:
parent
cca8d8299e
commit
3cd9bb0abb
@ -1,5 +1,15 @@
|
|||||||
## 1.2.23
|
## 1.2.23
|
||||||
|
|
||||||
|
Minimum Komga version required: `0.87.4`
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
* only show series tags in the filter panel
|
||||||
|
* set URL properly on series and read lists, so restoring from a backup can work properly
|
||||||
|
|
||||||
|
|
||||||
|
## 1.2.23
|
||||||
|
|
||||||
Minimum Komga version required: `0.75.0`
|
Minimum Komga version required: `0.75.0`
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'Komga'
|
extName = 'Komga'
|
||||||
pkgNameSuffix = 'all.komga'
|
pkgNameSuffix = 'all.komga'
|
||||||
extClass = '.KomgaFactory'
|
extClass = '.KomgaFactory'
|
||||||
extVersionCode = 23
|
extVersionCode = 24
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
|
|||||||
processSeriesPage(response)
|
processSeriesPage(response)
|
||||||
|
|
||||||
override fun mangaDetailsRequest(manga: SManga): Request =
|
override fun mangaDetailsRequest(manga: SManga): Request =
|
||||||
GET(baseUrl + manga.url, headers)
|
GET(manga.url, headers)
|
||||||
|
|
||||||
override fun mangaDetailsParse(response: Response): SManga =
|
override fun mangaDetailsParse(response: Response): SManga =
|
||||||
if (response.fromReadList()) {
|
if (response.fromReadList()) {
|
||||||
@ -176,7 +176,7 @@ open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListRequest(manga: SManga): Request =
|
override fun chapterListRequest(manga: SManga): Request =
|
||||||
GET("$baseUrl${manga.url}/books?unpaged=true&media_status=READY", headers)
|
GET("${manga.url}/books?unpaged=true&media_status=READY", headers)
|
||||||
|
|
||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
val page = gson.fromJson<PageWrapperDto<BookDto>>(response.body()?.charStream()!!).content
|
val page = gson.fromJson<PageWrapperDto<BookDto>>(response.body()?.charStream()!!).content
|
||||||
@ -227,8 +227,8 @@ open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
|
|||||||
private fun SeriesDto.toSManga(): SManga =
|
private fun SeriesDto.toSManga(): SManga =
|
||||||
SManga.create().apply {
|
SManga.create().apply {
|
||||||
title = metadata.title
|
title = metadata.title
|
||||||
url = "/api/v1/series/$id"
|
url = "$baseUrl/api/v1/series/$id"
|
||||||
thumbnail_url = "$baseUrl/api/v1/series/$id/thumbnail"
|
thumbnail_url = "$url/thumbnail"
|
||||||
status = when (metadata.status) {
|
status = when (metadata.status) {
|
||||||
"ONGOING" -> SManga.ONGOING
|
"ONGOING" -> SManga.ONGOING
|
||||||
"ENDED" -> SManga.COMPLETED
|
"ENDED" -> SManga.COMPLETED
|
||||||
@ -245,8 +245,8 @@ open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
|
|||||||
private fun ReadListDto.toSManga(): SManga =
|
private fun ReadListDto.toSManga(): SManga =
|
||||||
SManga.create().apply {
|
SManga.create().apply {
|
||||||
title = name
|
title = name
|
||||||
url = "/api/v1/readlists/$id"
|
url = "$baseUrl/api/v1/readlists/$id"
|
||||||
thumbnail_url = "$baseUrl/api/v1/readlists/$id/thumbnail"
|
thumbnail_url = "$url/thumbnail"
|
||||||
status = SManga.UNKNOWN
|
status = SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,7 +487,7 @@ open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
Single.fromCallable {
|
Single.fromCallable {
|
||||||
client.newCall(GET("$baseUrl/api/v1/tags", headers)).execute()
|
client.newCall(GET("$baseUrl/api/v1/tags/series", headers)).execute()
|
||||||
}
|
}
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user