Mangamo: Fix URLs for manga with question marks in title (#10847)

* Mangamo: fix URLs for manga with question marks in title

* Mangamo: bump version
This commit is contained in:
Trevor Paley 2025-10-03 04:16:29 -07:00 committed by Draff
parent dd6f475a01
commit 7b44fec7db
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'Mangamo' extName = 'Mangamo'
extClass = '.Mangamo' extClass = '.Mangamo'
extVersionCode = 6 extVersionCode = 7
isNsfw = false isNsfw = false
} }

View File

@ -12,6 +12,7 @@ import kotlinx.serialization.json.Json
import kotlinx.serialization.modules.SerializersModule import kotlinx.serialization.modules.SerializersModule
import kotlinx.serialization.serializer import kotlinx.serialization.serializer
import okhttp3.Headers import okhttp3.Headers
import java.net.URLEncoder
class MangamoHelper(headers: Headers) { class MangamoHelper(headers: Headers) {
@ -45,7 +46,7 @@ class MangamoHelper(headers: Headers) {
private fun getCatalogUrl(series: SeriesDto): String { private fun getCatalogUrl(series: SeriesDto): String {
val lowercaseHyphenated = series.name_lowercase!!.replace(' ', '-') val lowercaseHyphenated = series.name_lowercase!!.replace(' ', '-')
return "/catalog/$lowercaseHyphenated" return "/catalog/${URLEncoder.encode(lowercaseHyphenated, "utf-8")}"
} }
fun getSeriesUrl(series: SeriesDto): String { fun getSeriesUrl(series: SeriesDto): String {