diff --git a/src/all/batoto/build.gradle b/src/all/batoto/build.gradle index e7279ed6d..eee3b9e74 100644 --- a/src/all/batoto/build.gradle +++ b/src/all/batoto/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Bato.to' pkgNameSuffix = 'all.batoto' extClass = '.BatoToFactory' - extVersionCode = 6 + extVersionCode = 7 libVersion = '1.2' containsNsfw = true } diff --git a/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt b/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt index 14e17fdd7..c2c274c5a 100644 --- a/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt +++ b/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt @@ -37,7 +37,13 @@ open class BatoTo( return GET("$baseUrl/browse?langs=$siteLang&sort=update&page=$page") } - override fun latestUpdatesSelector() = "div#series-list div.col" + override fun latestUpdatesSelector(): String { + return when (siteLang) { + "" -> "div#series-list div.col" + "en" -> "div#series-list div.col.no-flag" + else -> "div#series-list div.col:has([data-lang=\"$siteLang\"])" + } + } override fun latestUpdatesFromElement(element: Element): SManga { val manga = SManga.create() @@ -60,12 +66,10 @@ open class BatoTo( override fun popularMangaFromElement(element: Element) = latestUpdatesFromElement(element) override fun popularMangaNextPageSelector() = latestUpdatesNextPageSelector() - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { return if (query.isNotBlank()) { GET("$baseUrl/search?word=$query&page=$page") } else { - var author: String? = null val url = HttpUrl.parse("$baseUrl/browse")!!.newBuilder() url.addQueryParameter("page", page.toString()) url.addQueryParameter("langs", siteLang) @@ -200,6 +204,9 @@ open class BatoTo( val value = date.split(' ')[0].toInt() return when { + "secs" in date -> Calendar.getInstance().apply { + add(Calendar.SECOND, value * -1) + }.timeInMillis "mins" in date -> Calendar.getInstance().apply { add(Calendar.MINUTE, value * -1) }.timeInMillis @@ -218,6 +225,9 @@ open class BatoTo( "years" in date -> Calendar.getInstance().apply { add(Calendar.YEAR, value * -1) }.timeInMillis + "sec" in date -> Calendar.getInstance().apply { + add(Calendar.SECOND, value * -1) + }.timeInMillis "min" in date -> Calendar.getInstance().apply { add(Calendar.MINUTE, value * -1) }.timeInMillis diff --git a/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoToFactory.kt b/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoToFactory.kt index 4c505d5f5..cc833c3f5 100644 --- a/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoToFactory.kt +++ b/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoToFactory.kt @@ -19,7 +19,7 @@ private val languages = listOf( Pair("de", "de"), Pair("el", "el"), Pair("en", "en"), - Pair("en_us", "en_us"), + Pair("en-US", "en_us"), Pair("es", "es"), Pair("es-419", "es_419"), Pair("eu", "eu"),