remanga double name title (#5413)

* remanga double name title

* fix
This commit is contained in:
Eugene 2021-01-14 16:44:56 +05:00 committed by GitHub
parent d09e57cac8
commit f9ac810129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Remanga' extName = 'Remanga'
pkgNameSuffix = 'ru.remanga' pkgNameSuffix = 'ru.remanga'
extClass = '.Remanga' extClass = '.Remanga'
extVersionCode = 11 extVersionCode = 12
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -134,7 +134,7 @@ class Remanga : ConfigurableSource, HttpSource() {
private fun LibraryDto.toSManga(): SManga = private fun LibraryDto.toSManga(): SManga =
SManga.create().apply { SManga.create().apply {
title = rus_name title = en_name + "\n" + rus_name
url = "/api/titles/$dir/" url = "/api/titles/$dir/"
thumbnail_url = "$baseUrl/${img.high}" thumbnail_url = "$baseUrl/${img.high}"
} }
@ -210,7 +210,7 @@ class Remanga : ConfigurableSource, HttpSource() {
private fun MangaDetDto.toSManga(): SManga { private fun MangaDetDto.toSManga(): SManga {
val o = this val o = this
return SManga.create().apply { return SManga.create().apply {
title = rus_name title = en_name + "\n" + rus_name
url = "/api/titles/$dir/" url = "/api/titles/$dir/"
thumbnail_url = "$baseUrl/${img.high}" thumbnail_url = "$baseUrl/${img.high}"
this.description = Jsoup.parse(o.description).text() this.description = Jsoup.parse(o.description).text()
@ -238,7 +238,7 @@ class Remanga : ConfigurableSource, HttpSource() {
override fun mangaDetailsParse(response: Response): SManga { override fun mangaDetailsParse(response: Response): SManga {
val series = gson.fromJson<SeriesWrapperDto<MangaDetDto>>(response.body()?.charStream()!!) val series = gson.fromJson<SeriesWrapperDto<MangaDetDto>>(response.body()?.charStream()!!)
branches[series.content.rus_name] = series.content.branches branches[series.content.en_name] = series.content.branches
return series.content.toSManga() return series.content.toSManga()
} }
@ -247,7 +247,7 @@ class Remanga : ConfigurableSource, HttpSource() {
// manga requiring login return "content" as a JsonArray instead of the JsonObject we expect // manga requiring login return "content" as a JsonArray instead of the JsonObject we expect
return if (gson.fromJson<JsonObject>(responseString)["content"].isJsonObject) { return if (gson.fromJson<JsonObject>(responseString)["content"].isJsonObject) {
val series = gson.fromJson<SeriesWrapperDto<MangaDetDto>>(responseString) val series = gson.fromJson<SeriesWrapperDto<MangaDetDto>>(responseString)
branches[series.content.rus_name] = series.content.branches branches[series.content.en_name] = series.content.branches
series.content.branches series.content.branches
} else { } else {
emptyList() emptyList()