diff --git a/src/ru/newbie/build.gradle b/src/ru/newbie/build.gradle index 45913a1e4..ed9b1d8e0 100644 --- a/src/ru/newbie/build.gradle +++ b/src/ru/newbie/build.gradle @@ -3,10 +3,10 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlinx-serialization' ext { - extName = 'Newbie' + extName = 'NewManga(Newbie)' pkgNameSuffix = 'ru.newbie' extClass = '.Newbie' - extVersionCode = 5 + extVersionCode = 6 } dependencies { diff --git a/src/ru/newbie/res/mipmap-hdpi/ic_launcher.png b/src/ru/newbie/res/mipmap-hdpi/ic_launcher.png index 7ff397956..64feb487f 100644 Binary files a/src/ru/newbie/res/mipmap-hdpi/ic_launcher.png and b/src/ru/newbie/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/ru/newbie/res/mipmap-mdpi/ic_launcher.png b/src/ru/newbie/res/mipmap-mdpi/ic_launcher.png index baced1263..3ae86d013 100644 Binary files a/src/ru/newbie/res/mipmap-mdpi/ic_launcher.png and b/src/ru/newbie/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/ru/newbie/res/mipmap-xhdpi/ic_launcher.png b/src/ru/newbie/res/mipmap-xhdpi/ic_launcher.png index 771d2c3c6..9f7365d6c 100644 Binary files a/src/ru/newbie/res/mipmap-xhdpi/ic_launcher.png and b/src/ru/newbie/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/ru/newbie/res/mipmap-xxhdpi/ic_launcher.png b/src/ru/newbie/res/mipmap-xxhdpi/ic_launcher.png index 223b58183..aee834a27 100644 Binary files a/src/ru/newbie/res/mipmap-xxhdpi/ic_launcher.png and b/src/ru/newbie/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/ru/newbie/res/mipmap-xxxhdpi/ic_launcher.png b/src/ru/newbie/res/mipmap-xxxhdpi/ic_launcher.png index 7b67a0974..134e80aaf 100644 Binary files a/src/ru/newbie/res/mipmap-xxxhdpi/ic_launcher.png and b/src/ru/newbie/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/ru/newbie/res/web_hi_res_512.png b/src/ru/newbie/res/web_hi_res_512.png index f0556b7be..4610e5251 100644 Binary files a/src/ru/newbie/res/web_hi_res_512.png and b/src/ru/newbie/res/web_hi_res_512.png differ diff --git a/src/ru/newbie/src/eu/kanade/tachiyomi/extension/ru/newbie/Newbie.kt b/src/ru/newbie/src/eu/kanade/tachiyomi/extension/ru/newbie/Newbie.kt index 6fc24fa70..c5de2e551 100644 --- a/src/ru/newbie/src/eu/kanade/tachiyomi/extension/ru/newbie/Newbie.kt +++ b/src/ru/newbie/src/eu/kanade/tachiyomi/extension/ru/newbie/Newbie.kt @@ -38,7 +38,9 @@ import java.util.Date import java.util.Locale class Newbie : HttpSource() { - override val name = "Newbie" + override val name = "NewManga(Newbie)" + + override val id: Long = 8033757373676218584 override val baseUrl = "https://newmanga.org" @@ -82,7 +84,7 @@ class Newbie : HttpSource() { val mangas = page.items.map { it.toSManga() } - return MangasPage(mangas, mangas.size == count) + return MangasPage(mangas, mangas.isNotEmpty()) } private fun LibraryDto.toSManga(): SManga { @@ -160,6 +162,12 @@ class Newbie : HttpSource() { else -> type } } + private fun parseAge(adult: String): String { + return when (adult) { + "" -> "0+" + else -> "$adult+" + } + } private fun MangaDetDto.toSManga(): SManga { val ratingValue = DecimalFormat("#,###.##").format(rating * 2).replace(",", ".").toFloat() @@ -185,7 +193,7 @@ class Newbie : HttpSource() { author = o.author?.name artist = o.artist?.name description = o.title.ru + "\n" + ratingStar + " " + ratingValue + "\n" + Jsoup.parse(o.description).text() - genre = genres.joinToString { it.title.ru.capitalize() } + ", " + parseType(type) + ", " + "$adult+" + genre = parseType(type) + ", " + adult?.let { parseAge(it) } + ", " + genres.joinToString { it.title.ru.capitalize() } status = parseStatus(o.status) } }