mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 17:34:39 -05:00
Update dependencies (#611)
This commit is contained in:
@@ -24,6 +24,11 @@ dependencies {
|
||||
implementation(libs.bundles.javalin)
|
||||
implementation(libs.bundles.jackson)
|
||||
|
||||
// GraphQL
|
||||
implementation(libs.graphql.kotlin.server)
|
||||
implementation(libs.graphql.kotlin.scheme)
|
||||
implementation(libs.graphql.scalars)
|
||||
|
||||
// Exposed ORM
|
||||
implementation(libs.bundles.exposed)
|
||||
implementation(libs.h2)
|
||||
@@ -65,10 +70,6 @@ dependencies {
|
||||
// implementation(fileTree("lib/"))
|
||||
implementation(kotlin("script-runtime"))
|
||||
|
||||
implementation("com.expediagroup:graphql-kotlin-server:6.4.0")
|
||||
implementation("com.expediagroup:graphql-kotlin-schema-generator:6.4.0")
|
||||
implementation("com.graphql-java:graphql-java-extended-scalars:20.0")
|
||||
|
||||
testImplementation(libs.mockk)
|
||||
|
||||
implementation(libs.cron4j)
|
||||
|
||||
@@ -67,7 +67,7 @@ suspend fun Call.await(): Response {
|
||||
}
|
||||
|
||||
continuation.resume(response) {
|
||||
response.body?.closeQuietly()
|
||||
response.body.closeQuietly()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ fun OkHttpClient.newCallWithProgress(request: Request, listener: ProgressListene
|
||||
.addNetworkInterceptor { chain ->
|
||||
val originalResponse = chain.proceed(chain.request())
|
||||
originalResponse.newBuilder()
|
||||
.body(ProgressResponseBody(originalResponse.body!!, listener))
|
||||
.body(ProgressResponseBody(originalResponse.body, listener))
|
||||
.build()
|
||||
}
|
||||
.build()
|
||||
@@ -132,7 +132,7 @@ inline fun <reified T> Response.parseAs(): T {
|
||||
// Avoiding Injekt.get<Json>() due to compiler issues
|
||||
val json = Injekt.getInstance<Json>(fullType<Json>().type)
|
||||
this.use {
|
||||
val responseBody = it.body?.string().orEmpty()
|
||||
val responseBody = it.body.string()
|
||||
return json.decodeFromString(responseBody)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,5 +22,5 @@ fun Element.attrOrText(css: String): String {
|
||||
* @param html the body of the response. Use only if the body was read before calling this method.
|
||||
*/
|
||||
fun Response.asJsoup(html: String? = null): Document {
|
||||
return Jsoup.parse(html ?: body!!.string(), request.url.toString())
|
||||
return Jsoup.parse(html ?: body.string(), request.url.toString())
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ object Extension {
|
||||
|
||||
val downloadedFile = File(savePath)
|
||||
downloadedFile.sink().buffer().use { sink ->
|
||||
response.body!!.source().use { source ->
|
||||
response.body.source().use { source ->
|
||||
sink.writeAll(source)
|
||||
sink.flush()
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ suspend fun Call.await(): Response {
|
||||
}
|
||||
|
||||
continuation.resume(response) {
|
||||
response.body?.closeQuietly()
|
||||
response.body.closeQuietly()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,16 +26,12 @@ class UnzippingInterceptor : Interceptor {
|
||||
|
||||
@Throws(IOException::class)
|
||||
private fun unzip(response: Response): Response {
|
||||
if (response.body == null) {
|
||||
return response
|
||||
}
|
||||
|
||||
// check if we have gzip response
|
||||
val contentEncoding: String? = response.headers["Content-Encoding"]
|
||||
|
||||
// this is used to decompress gzipped responses
|
||||
return if (contentEncoding != null && contentEncoding == "gzip") {
|
||||
val body = response.body!!
|
||||
val body = response.body
|
||||
val contentLength: Long = body.contentLength()
|
||||
val responseBody = GzipSource(body.source())
|
||||
val strippedHeaders: Headers = response.headers.newBuilder().build()
|
||||
|
||||
@@ -45,7 +45,7 @@ object AppMutex {
|
||||
.build()
|
||||
|
||||
val response = try {
|
||||
client.newCall(request).execute().use { response -> response.body!!.string() }
|
||||
client.newCall(request).execute().body.string()
|
||||
} catch (e: IOException) {
|
||||
return AppMutexState.Clear
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user