diff --git a/src/en/mangamiso/build.gradle b/src/en/mangamiso/build.gradle index 9ce8d30d7..efd2ff382 100644 --- a/src/en/mangamiso/build.gradle +++ b/src/en/mangamiso/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'MangaMiso' pkgNameSuffix = 'en.mangamiso' extClass = '.MangaMiso' - extVersionCode = 2 + extVersionCode = 3 isNsfw = true } diff --git a/src/en/mangamiso/src/eu/kanade/tachiyomi/extension/en/mangamiso/MangaMiso.kt b/src/en/mangamiso/src/eu/kanade/tachiyomi/extension/en/mangamiso/MangaMiso.kt index 785a6fcb7..ee439a1b0 100644 --- a/src/en/mangamiso/src/eu/kanade/tachiyomi/extension/en/mangamiso/MangaMiso.kt +++ b/src/en/mangamiso/src/eu/kanade/tachiyomi/extension/en/mangamiso/MangaMiso.kt @@ -25,7 +25,7 @@ import java.util.Locale class MangaMiso : HttpSource() { companion object { - const val MANGA_PER_PAGE = 50 + const val MANGA_PER_PAGE = 20 val DATE_FORMAT = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US) const val PREFIX_ID_SEARCH = "id:" } @@ -159,17 +159,19 @@ class MangaMiso : HttpSource() { } private fun cleanDescription(mangaDesc: String): String { - - // Get description up to the closing tag (
) - var description = mangaDesc.substringBefore("") + // Remove the link to the manga on other sites + var description = "Link:.*
".toRegex(RegexOption.IGNORE_CASE).replace(mangaDesc, "") // Convert any breaks", "\n\n", true) // Replace any other tags with nothing - description = description.replace("<.*?>".toRegex(), "") + description = "<.*?>".toRegex().replace(description, "") - return description + return description.trim() } private fun mapStatus(status: String) = @@ -387,13 +389,13 @@ class MangaMiso : HttpSource() { private fun toSManga(manga: MisoManga): SManga { return SManga.create().apply { - title = manga.title + title = manga.title.trim() author = manga.author.joinToString(",", transform = ::humanizeID) artist = manga.artist.joinToString(",", transform = ::humanizeID) thumbnail_url = "$baseUrl${manga.coverImage}" url = "$baseUrl/manga/${manga.pathName}" - genre = manga.tags.joinToString(", ") { humanizeID(it) } + genre = manga.tags.joinToString(", ", transform = ::humanizeID) description = cleanDescription(manga.description) @@ -403,7 +405,7 @@ class MangaMiso : HttpSource() { private fun toSChapter(chapter: MisoChapter, mangaURL: String): SChapter { return SChapter.create().apply { - name = chapter.title + name = chapter.title.trim() date_upload = try { DATE_FORMAT.parse(chapter.createdAt)!!.time } catch (e: Exception) { System.currentTimeMillis() } url = "$mangaURL/${chapter.pathName}" chapter_number = chapter.chapterNum