mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 10:04:39 +02:00
fix(InternalDownloadManager): add accept-encoding identity to requests
This commit is contained in:
parent
e7ad62760f
commit
dfc77ea0d0
1 changed files with 10 additions and 2 deletions
|
@ -17,8 +17,16 @@ class InternalDownloadManager(
|
|||
) : AutoCloseable {
|
||||
|
||||
private val tag = "InternalDownloadManager"
|
||||
private val client: OkHttpClient =
|
||||
OkHttpClient.Builder().connectTimeout(30, TimeUnit.SECONDS).build()
|
||||
private val client: OkHttpClient = OkHttpClient.Builder()
|
||||
.connectTimeout(30, TimeUnit.SECONDS)
|
||||
.addInterceptor { chain ->
|
||||
val originalRequest = chain.request()
|
||||
val newRequest = originalRequest.newBuilder()
|
||||
.header("Accept-Encoding", "identity")
|
||||
.build()
|
||||
chain.proceed(newRequest)
|
||||
}
|
||||
.build()
|
||||
private val writer = BinaryFileWriter(outputStream, progressCallback)
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue