[skip ci] Update dependencies (#1343)

* Bump harmless dependencies

Note that bumping the android plugin will make compilation show lots of
"hey bro use namespace instead of AndroidManifest.xml" warnings

* Remove duktape dependency

Zero extensions are using it, so its safe to remove. For executing js in
extensions we can use quickjs instead of ducktape.

* Upgrade gradle to 7.6

* Update kotlin

* Update OkHttp

* Update JSoup

Jesus Christ this was boring asf

* Update KtLint

* [skip ci] refactor on some build.gradle.kts files

* Expose coroutines to all extension by default
This commit is contained in:
Claudemirovsky
2023-02-28 10:12:46 -03:00
committed by GitHub
parent a5c2427e70
commit 62f45e094d
387 changed files with 3380 additions and 2909 deletions

View File

@ -12,14 +12,10 @@ android {
}
}
repositories {
mavenCentral()
}
dependencies {
compileOnly(libs.kotlin.stdlib)
compileOnly(libs.kotlin.json)
compileOnly(libs.okhttp)
compileOnly(libs.aniyomi.lib)
}
// BUMPS: 0
// BUMPS: 0

View File

@ -52,12 +52,12 @@ class StreamSBExtractor(private val client: OkHttpClient) {
val master = fixUrl(url, common)
val json = Json.decodeFromString<JsonObject>(
client.newCall(GET(master, newHeaders))
.execute().body!!.string()
.execute().body.string()
)
val masterUrl = json["stream_data"]!!.jsonObject["file"].toString().trim('"')
val masterPlaylist = client.newCall(GET(masterUrl, newHeaders))
.execute()
.body!!.string()
.body.string()
val separator = "#EXT-X-STREAM-INF"
masterPlaylist.substringAfter(separator).split(separator).map {
val resolution = it.substringAfter("RESOLUTION=")
@ -81,9 +81,9 @@ class StreamSBExtractor(private val client: OkHttpClient) {
fun videosFromDecryptedUrl(realUrl: String, headers: Headers, prefix: String = "", suffix: String = ""): List<Video> {
return try {
val json = Json.decodeFromString<JsonObject>(client.newCall(GET(realUrl, headers)).execute().body!!.string())
val json = Json.decodeFromString<JsonObject>(client.newCall(GET(realUrl, headers)).execute().body.string())
val masterUrl = json["stream_data"]!!.jsonObject["file"].toString().trim('"')
val masterPlaylist = client.newCall(GET(masterUrl, headers)).execute().body!!.string()
val masterPlaylist = client.newCall(GET(masterUrl, headers)).execute().body.string()
val separator = "#EXT-X-STREAM-INF"
masterPlaylist.substringAfter(separator).split(separator).map {
val resolution = it.substringAfter("RESOLUTION=")