fix(pt/Anitube): Fix video links (#1638)

* fix: Fix video links

* chore: Bump version
This commit is contained in:
Claudemirovsky 2023-05-22 22:05:20 +00:00 committed by GitHub
parent 055c99be5a
commit 48eefa5045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -1,11 +1,13 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}
ext {
extName = 'Anitube'
pkgNameSuffix = 'pt.anitube'
extClass = '.Anitube'
extVersionCode = 9
extVersionCode = 10
libVersion = '13'
}

View File

@ -17,13 +17,13 @@ object AnitubeExtractor {
.replace("cdn1", "cdn3")
val type = serverUrl.split("/").get(3)
val qualities = listOfNotNull("SD", "HD", if (hasFHD) "FULLHD" else null)
val paths = listOf("appsd", "apphd", "appfullhd").let {
val paths = listOf("appsd", "apphd").let {
if (type.endsWith("2")) {
it.map { path -> path + "2" }
} else {
it
}
}
} + listOf("appfullhd")
return qualities.mapIndexed { index, quality ->
val path = paths[index]
val url = serverUrl.replace(type, path)