light cleanup in MangaPlus file

This commit is contained in:
Jays2Kings 2023-02-26 15:43:39 -05:00
parent e09ae4d347
commit 8dda29c783

View file

@ -42,7 +42,7 @@ class MangaPlus : DelegatedHttpSource() {
return withContext(Dispatchers.IO) {
val response = network.client.newCall(request).await()
if (response.code != 200) throw Exception("HTTP error ${response.code}")
val body = response.body!!.string()
val body = response.body.string()
val match = titleIdRegex.find(body)
val titleId = match?.groupValues?.firstOrNull()?.substringAfterLast("/")
?: error("Title not found")
@ -66,7 +66,7 @@ class MangaPlus : DelegatedHttpSource() {
manga.apply {
this.title = trimmedTitle
},
chapters.orEmpty(),
chapters,
)
} else {
null