mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-29 14:28:34 +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 {
|
) : AutoCloseable {
|
||||||
|
|
||||||
private val tag = "InternalDownloadManager"
|
private val tag = "InternalDownloadManager"
|
||||||
private val client: OkHttpClient =
|
private val client: OkHttpClient = OkHttpClient.Builder()
|
||||||
OkHttpClient.Builder().connectTimeout(30, TimeUnit.SECONDS).build()
|
.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)
|
private val writer = BinaryFileWriter(outputStream, progressCallback)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue