MangaMutiny - JsonNull fix (#3551)
* MangaMutiny - JsonNull fix Some thumbnails and manga descriptions aren't maintained by the website. This results in avoidable errors. Fixed with this commit. * MangaMutiny - Increment extension version number
This commit is contained in:
parent
cdb05415ee
commit
7220a19a58
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Manga Mutiny'
|
appName = 'Tachiyomi: Manga Mutiny'
|
||||||
pkgNameSuffix = "en.mangamutiny"
|
pkgNameSuffix = "en.mangamutiny"
|
||||||
extClass = '.MangaMutiny'
|
extClass = '.MangaMutiny'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,8 +140,8 @@ class MangaMutiny : HttpSource() {
|
||||||
"completed" -> SManga.COMPLETED
|
"completed" -> SManga.COMPLETED
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
description = rootNode.get("summary").asString
|
description = rootNode.getNullable("summary")?.asString
|
||||||
thumbnail_url = rootNode.get("thumbnail")?.asString
|
thumbnail_url = rootNode.getNullable("thumbnail")?.asString
|
||||||
title = rootNode.get("title").asString
|
title = rootNode.get("title").asString
|
||||||
url = rootNode.get("slug").asString
|
url = rootNode.get("slug").asString
|
||||||
artist = rootNode.get("artists").asString
|
artist = rootNode.get("artists").asString
|
||||||
|
@ -211,7 +211,7 @@ class MangaMutiny : HttpSource() {
|
||||||
val mangaObject = singleItem.asJsonObject
|
val mangaObject = singleItem.asJsonObject
|
||||||
mangasPage.add(SManga.create().apply {
|
mangasPage.add(SManga.create().apply {
|
||||||
this.title = mangaObject.get("title").asString
|
this.title = mangaObject.get("title").asString
|
||||||
this.thumbnail_url = mangaObject.get("thumbnail")?.asString
|
this.thumbnail_url = mangaObject.getNullable("thumbnail")?.asString
|
||||||
this.url = mangaObject.get("slug").asString
|
this.url = mangaObject.get("slug").asString
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue