mirror of
https://github.com/sudoxnym/audiobookshelf-atv.git
synced 2026-04-14 19:46:30 +00: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…
Reference in a new issue