diff --git a/src/all/batoto/AndroidManifest.xml b/src/all/batoto/AndroidManifest.xml index c4ca310dd..85cb5b64f 100644 --- a/src/all/batoto/AndroidManifest.xml +++ b/src/all/batoto/AndroidManifest.xml @@ -47,6 +47,9 @@ + diff --git a/src/all/batoto/build.gradle b/src/all/batoto/build.gradle index 796d6111e..20571170a 100644 --- a/src/all/batoto/build.gradle +++ b/src/all/batoto/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Bato.to' extClass = '.BatoToFactory' - extVersionCode = 35 + extVersionCode = 36 isNsfw = true } diff --git a/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoToUrlActivity.kt b/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoToUrlActivity.kt index 4f1bd140e..90b9718e4 100644 --- a/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoToUrlActivity.kt +++ b/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoToUrlActivity.kt @@ -42,8 +42,25 @@ class BatoToUrlActivity : Activity() { private fun fromBatoTo(pathSegments: MutableList): String? { return if (pathSegments.size >= 2) { - val id = pathSegments[1] - "ID:$id" + val path = pathSegments[1] as java.lang.String? + if (path != null) { + var index = -1 + for (i in path.indices) { + if (path[i] == '-') { + index = i + break + } + } + + val id = if (index == -1) { + path + } else { + path.substring(0, index) + } + "ID:$id" + } else { + null + } } else { null }