MangaMx: Moved to MangaOni (#14739)
* MangaMX: Moved to MangaOni * MangaMX: Moved to MangaOni * Update Logo * Apply requested changes
|
@ -3,10 +3,10 @@ apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlinx-serialization'
|
apply plugin: 'kotlinx-serialization'
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
extName = 'MangaMx'
|
extName = 'MangaOni'
|
||||||
pkgNameSuffix = 'es.mangamx'
|
pkgNameSuffix = 'es.mangamx'
|
||||||
extClass = '.MangaMx'
|
extClass = '.MangaOni'
|
||||||
extVersionCode = 13
|
extVersionCode = 14
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 49 KiB |
|
@ -29,11 +29,13 @@ import java.nio.charset.Charset
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
open class MangaMx : ConfigurableSource, ParsedHttpSource() {
|
open class MangaOni : ConfigurableSource, ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "MangaMx"
|
override val name = "MangaOni"
|
||||||
|
|
||||||
override val baseUrl = "https://manga-mx.com"
|
override val id: Long = 2202687009511923782
|
||||||
|
|
||||||
|
override val baseUrl = "https://manga-oni.com"
|
||||||
|
|
||||||
override val lang = "es"
|
override val lang = "es"
|
||||||
|
|
||||||
|
@ -152,9 +154,12 @@ open class MangaMx : ConfigurableSource, ParsedHttpSource() {
|
||||||
|
|
||||||
return MangasPage(mangas, hasNextPage)
|
return MangasPage(mangas, hasNextPage)
|
||||||
} else {
|
} else {
|
||||||
val result = json.decodeFromString<ResponseDto>(response.body!!.string())
|
val jsonString = response.body?.string().orEmpty()
|
||||||
if (result.mangaList.isEmpty()) throw Exception("Término de búsqueda demasiado corto")
|
val result = json.decodeFromString<ResponseDto>(jsonString)
|
||||||
|
|
||||||
|
if (result.mangaList.isEmpty()) {
|
||||||
|
return MangasPage(emptyList(), hasNextPage = false)
|
||||||
|
}
|
||||||
val mangaList = result.mangaList
|
val mangaList = result.mangaList
|
||||||
.map(::searchMangaFromObject)
|
.map(::searchMangaFromObject)
|
||||||
|
|