Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
96a0062
Test coil with ktor
Luna712 May 13, 2026
0fbb83e
Update
Luna712 May 13, 2026
a1825df
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 May 15, 2026
7dddea4
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 May 15, 2026
5c86a97
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 May 15, 2026
80e1faa
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 4, 2026
9ec9140
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 21, 2026
a16d331
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 23, 2026
fb45abc
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 23, 2026
c4fae93
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 23, 2026
c75ccbe
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 23, 2026
34cc6e3
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 23, 2026
55bc4af
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 24, 2026
232b36c
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 25, 2026
3f8ec32
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 26, 2026
fb9d703
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jun 30, 2026
9bd4808
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 2, 2026
b6c3e0d
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 2, 2026
df393d1
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 2, 2026
314673f
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 3, 2026
82eeed4
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 3, 2026
923f6c5
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 7, 2026
72edd10
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 8, 2026
10c924e
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 9, 2026
5ab0090
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 9, 2026
eb9d744
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 10, 2026
f014102
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 10, 2026
5ac8024
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 10, 2026
a07e150
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 12, 2026
b651b4f
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 13, 2026
ebcc476
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 13, 2026
72e12eb
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 13, 2026
b6ff8d3
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 14, 2026
27ce756
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 15, 2026
cbbf0e0
Merge branch 'nicehttp-test2' into coil-ktor
Luna712 Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import coil3.load
import coil3.memory.MemoryCache
import coil3.network.NetworkHeaders
import coil3.network.httpHeaders
import coil3.network.okhttp.OkHttpNetworkFetcherFactory
import coil3.network.ktor3.KtorNetworkFetcherFactory
import coil3.request.CachePolicy
import coil3.request.ErrorResult
import coil3.request.ImageRequest
Expand All @@ -29,7 +29,7 @@ import coil3.request.crossfade
import coil3.util.DebugLogger
import com.lagradost.cloudstream3.BuildConfig
import com.lagradost.cloudstream3.USER_AGENT
import com.lagradost.cloudstream3.network.buildDefaultClient
import com.lagradost.cloudstream3.network.buildDefaultKtorClient
import okio.Path.Companion.toOkioPath
import java.io.File
import java.nio.ByteBuffer
Expand Down Expand Up @@ -57,17 +57,10 @@ object ImageLoader {
}
/** Pass interceptors with care, unnecessary passing tokens to servers
or image hosting services causes unauthorized exceptions **/
.components {
add(OkHttpNetworkFetcherFactory(callFactory = { buildDefaultClient(context) }))
if (isBrokenHardware) {
add(BitmapFactoryDecoder.Factory())
} // sw decoder
}
.apply {
if (isBrokenHardware) { // coil will auto choose optimal config on modern device
bitmapConfig(Bitmap.Config.ARGB_8888)
}
setupCoilLogger()
.components { add(KtorNetworkFetcherFactory(httpClient = { buildDefaultKtorClient(context) })) }
.also {
it.setupCoilLogger()
Log.d(TAG, "buildImageLoader: Setting COIL Image Loader.")
}
.build()
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ annotation = { module = "androidx.annotation:annotation", version.ref = "annotat
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
coil-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coil" }
coil-network-ktor3 = { module = "io.coil-kt.coil3:coil-network-ktor3", version.ref = "coil" }
colorpicker = { module = "com.github.recloudstream:color-picker-android", version.ref = "colorpicker" }
conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "conscryptAndroid" }
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
Expand Down Expand Up @@ -147,7 +147,7 @@ kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinGradlePlugin" }

[bundles]
coil = ["coil", "coil-network-okhttp"]
coil = ["coil", "coil-network-ktor3"]
cryptography = ["cryptography-core", "cryptography-provider-optimal"]
lifecycle = ["lifecycle-livedata-ktx", "lifecycle-viewmodel-ktx"]
media3 = ["media3-cast", "media3-common", "media3-container", "media3-datasource-cronet", "media3-datasource-okhttp", "media3-exoplayer", "media3-exoplayer-dash", "media3-exoplayer-hls", "media3-session", "media3-ui"]
Expand Down