mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-05 03:44:36 -05:00
Update dependencies (#611)
This commit is contained in:
@@ -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