From ebf9545efea0bc42121c18007cc73bd486ddb9f4 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Thu, 7 May 2026 15:06:18 -0600 Subject: [PATCH 001/116] Test --- .../lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt index b83a32e45dc..9d7a1fcea06 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt @@ -203,4 +203,4 @@ class Addic7ed : SubtitleAPI() { "zh-hans" to Pair("41", "Chinese (Simplified)"), "zh-hant" to Pair("24", "Chinese (Traditional)"), ) -} \ No newline at end of file +} From 5ef97cd937e89da7c4760207763861457af4b544 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Thu, 7 May 2026 16:56:47 -0600 Subject: [PATCH 002/116] Test --- .../com/lagradost/cloudstream3/network/CloudflareKiller.kt | 4 ++-- .../com/lagradost/cloudstream3/network/DdosGuardKiller.kt | 4 ++-- .../com/lagradost/cloudstream3/network/RequestsHelper.kt | 4 ++-- .../lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt | 2 +- gradle/libs.versions.toml | 4 ++-- .../cloudstream3/network/WebViewResolver.android.kt | 2 +- .../commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt | 2 +- .../kotlin/com/lagradost/cloudstream3/MainActivity.kt | 6 +++--- .../com/lagradost/cloudstream3/extractors/Streamlare.kt | 2 +- .../kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt | 2 +- .../lagradost/cloudstream3/network/WebViewResolver.jvm.kt | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 9efa88a37f6..206cc0ab2f5 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -6,8 +6,8 @@ import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe -import com.lagradost.nicehttp.Requests.Companion.await -import com.lagradost.nicehttp.cookies +import com.lagradost.nicehttp.kmp.Requests.Companion.await +import com.lagradost.nicehttp.kmp.cookies import kotlinx.coroutines.runBlocking import okhttp3.Headers import okhttp3.Interceptor diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt index b5783f78c6e..3ad80de440e 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt @@ -2,8 +2,8 @@ package com.lagradost.cloudstream3.network import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app -import com.lagradost.nicehttp.Requests -import com.lagradost.nicehttp.cookies +import com.lagradost.nicehttp.kmp.Requests +import com.lagradost.nicehttp.kmp.cookies import kotlinx.coroutines.runBlocking import okhttp3.Interceptor import okhttp3.Request diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt index 6234297d080..18ae431179f 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt @@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.Prerelease import com.lagradost.cloudstream3.R import com.lagradost.cloudstream3.USER_AGENT import com.lagradost.cloudstream3.mvvm.safe -import com.lagradost.nicehttp.Requests -import com.lagradost.nicehttp.ignoreAllSSLErrors +import com.lagradost.nicehttp.kmp.Requests +import com.lagradost.nicehttp.kmp.ignoreAllSSLErrors import okhttp3.Cache import okhttp3.Headers import okhttp3.Headers.Companion.toHeaders diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt index 8dbd7817898..6a635e817c9 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt @@ -3,7 +3,7 @@ package com.lagradost.cloudstream3.ui.search import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError -import com.lagradost.nicehttp.NiceResponse +import com.lagradost.nicehttp.kmp.NiceResponse /** * API for fetching search suggestions from external sources. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 12fd8525744..5040a55b03e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "0.4.18" +nicehttp = "027e418" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" @@ -103,7 +103,7 @@ navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version. newpipeextractor = { module = "com.github.teamnewpipe:NewPipeExtractor", version.ref = "newpipeextractor" } nextlib-media3ext = { module = "io.github.anilbeesetti:nextlib-media3ext", version.ref = "nextlibMedia3" } nextlib-mediainfo = { module = "io.github.anilbeesetti:nextlib-mediainfo", version.ref = "nextlibMedia3" } -nicehttp = { module = "com.github.Blatzar:NiceHttp", version.ref = "nicehttp" } +nicehttp = { module = "com.github.Luna712:NiceHttp-kmp", version.ref = "nicehttp" } overlappingpanels = { module = "com.github.discord:OverlappingPanels", version.ref = "overlappingpanels" } palette-ktx = { module = "androidx.palette:palette-ktx", version.ref = "paletteKtx" } preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index 975572d054c..8217cf0c21d 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -14,7 +14,7 @@ import com.lagradost.cloudstream3.utils.Coroutines.main import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.runOnMainThread import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf -import com.lagradost.nicehttp.requestCreator +import com.lagradost.nicehttp.kmp.requestCreator import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking import okhttp3.Interceptor diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt index 33933c6b3f8..1ec2df4c55c 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt @@ -21,7 +21,7 @@ import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToLangTagIETF import com.lagradost.cloudstream3.utils.SubtitleHelper.fromLanguageToTagIETF -import com.lagradost.nicehttp.RequestBodyTypes +import com.lagradost.nicehttp.kmp.RequestBodyTypes import okhttp3.Interceptor import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt index a74097fd5f4..adf5076f863 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt @@ -5,9 +5,9 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fleeksoft.ksoup.Ksoup import com.fleeksoft.ksoup.nodes.Document -import com.lagradost.nicehttp.NiceResponse -import com.lagradost.nicehttp.Requests -import com.lagradost.nicehttp.ResponseParser +import com.lagradost.nicehttp.kmp.NiceResponse +import com.lagradost.nicehttp.kmp.Requests +import com.lagradost.nicehttp.kmp.ResponseParser import kotlin.reflect.KClass // Short name for requests client to make it nicer to use diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt index da2dd62bef5..c1b55fe4493 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt @@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.INFER_TYPE import com.lagradost.cloudstream3.utils.newExtractorLink import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.nicehttp.RequestBodyTypes +import com.lagradost.nicehttp.kmp.RequestBodyTypes import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt index 6741eb692f2..3aa7eb25282 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt @@ -3,7 +3,7 @@ package com.lagradost.cloudstream3.utils import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode import com.lagradost.cloudstream3.ksoupDocument -import com.lagradost.nicehttp.NiceResponse +import com.lagradost.nicehttp.kmp.NiceResponse import java.net.URI import java.net.URLDecoder diff --git a/library/src/jvmMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.jvm.kt b/library/src/jvmMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.jvm.kt index 39e0d51f95e..6f4c2592cde 100644 --- a/library/src/jvmMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.jvm.kt +++ b/library/src/jvmMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.jvm.kt @@ -2,7 +2,7 @@ package com.lagradost.cloudstream3.network import com.lagradost.cloudstream3.mvvm.debugException import com.lagradost.cloudstream3.mvvm.logError -import com.lagradost.nicehttp.requestCreator +import com.lagradost.nicehttp.kmp.requestCreator import okhttp3.Interceptor import okhttp3.Request import okhttp3.Response From 7ef1d0ab156b190e3855fde284d35283549f1b08 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Thu, 7 May 2026 17:12:04 -0600 Subject: [PATCH 003/116] Try --- gradle/libs.versions.toml | 3 ++- library/build.gradle.kts | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5040a55b03e..60cd32b270e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -103,7 +103,8 @@ navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version. newpipeextractor = { module = "com.github.teamnewpipe:NewPipeExtractor", version.ref = "newpipeextractor" } nextlib-media3ext = { module = "io.github.anilbeesetti:nextlib-media3ext", version.ref = "nextlibMedia3" } nextlib-mediainfo = { module = "io.github.anilbeesetti:nextlib-mediainfo", version.ref = "nextlibMedia3" } -nicehttp = { module = "com.github.Luna712:NiceHttp-kmp", version.ref = "nicehttp" } +nicehttp = { module = "com.github.Luna712.NiceHttp-kmp:library-android", version.ref = "nicehttp" } +nicehttp-jvm = { module = "com.github.Luna712.NiceHttp-kmp:library-jvm", version.ref = "nicehttp" } overlappingpanels = { module = "com.github.discord:OverlappingPanels", version.ref = "overlappingpanels" } palette-ktx = { module = "androidx.palette:palette-ktx", version.ref = "paletteKtx" } preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } diff --git a/library/build.gradle.kts b/library/build.gradle.kts index cf3c3aff5bc..b7117ce1049 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -54,7 +54,6 @@ kotlin { commonMain.dependencies { implementation(libs.annotation) // Annotations - implementation(libs.nicehttp) // HTTP Lib implementation(libs.jackson.module.kotlin) // JSON Parser implementation(libs.kotlinx.coroutines.core) implementation(libs.fuzzywuzzy) // Match Extractors @@ -63,6 +62,14 @@ kotlin { implementation(libs.newpipeextractor) implementation(libs.tmdb.java) // TMDB API v3 Wrapper Made with RetroFit } + + androidMain.dependencies { + implementation(libs.nicehttp) // HTTP Lib + } + + jvmMain.dependencies { + implementation(libs.nicehttp.jvm) // HTTP Lib + } } } From c33c9f24ab7f8925c66735d759c703c81d146ca6 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Thu, 7 May 2026 18:42:14 -0600 Subject: [PATCH 004/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 60cd32b270e..ef6e4c3ea61 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "027e418" +nicehttp = "ca5d08b1e6" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 2748e1689dc50f0a240af3dfa30d4cf38faa8ee4 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Thu, 7 May 2026 19:10:57 -0600 Subject: [PATCH 005/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ef6e4c3ea61..b4dbbef2c52 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "ca5d08b1e6" +nicehttp = "8a846b4b34" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From c79e9f68d7407ef25d5923f8091b2a671509ae17 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Thu, 7 May 2026 20:56:40 -0600 Subject: [PATCH 006/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b4dbbef2c52..3dfefb179f4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "8a846b4b34" +nicehttp = "ce4fb50a33" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 5672ae6d4d7608562f84465d80c0888507cc5315 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 16:43:15 -0600 Subject: [PATCH 007/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3dfefb179f4..59d960ced96 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "ce4fb50a33" +nicehttp = "0b802cf910" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 4fc74e1fb51a5c5b122fbe2a806b91d989958c6f Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 16:58:29 -0600 Subject: [PATCH 008/116] Fix --- .../kotlin/com/lagradost/cloudstream3/MainActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt index adf5076f863..d299212da19 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt @@ -36,7 +36,7 @@ private val jacksonResponseParser = object : ResponseParser { /** The default networking helper. This helper performs SSL checks. * If you need to make requests to websites with invalid SSL certificates use insecureApp instead. */ -var app = Requests(responseParser = jacksonResponseParser).apply { +var app = (Requests(responseParser = jacksonResponseParser) as NiceResponse).apply { defaultHeaders = mapOf("user-agent" to USER_AGENT) } @@ -48,6 +48,6 @@ val NiceResponse.ksoupDocument: Document * This should NEVER be used for sensitive networking operations such as logins. Only use this when required. */ @Prerelease @UnsafeSSL -var insecureApp = Requests(responseParser = jacksonResponseParser).apply { +var insecureApp = (Requests(responseParser = jacksonResponseParser) as NiceResponse).apply { defaultHeaders = mapOf("user-agent" to USER_AGENT) -} \ No newline at end of file +} From e725176572050121615ce87b9a2af66398a3681c Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 17:04:46 -0600 Subject: [PATCH 009/116] Fix --- .../kotlin/com/lagradost/cloudstream3/MainActivity.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt index d299212da19..b3894571205 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt @@ -5,7 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fleeksoft.ksoup.Ksoup import com.fleeksoft.ksoup.nodes.Document -import com.lagradost.nicehttp.kmp.NiceResponse +import com.lagradost.nicehttp.kmp.INiceResponse import com.lagradost.nicehttp.kmp.Requests import com.lagradost.nicehttp.kmp.ResponseParser import kotlin.reflect.KClass @@ -36,18 +36,18 @@ private val jacksonResponseParser = object : ResponseParser { /** The default networking helper. This helper performs SSL checks. * If you need to make requests to websites with invalid SSL certificates use insecureApp instead. */ -var app = (Requests(responseParser = jacksonResponseParser) as NiceResponse).apply { +var app = Requests(responseParser = jacksonResponseParser).apply { defaultHeaders = mapOf("user-agent" to USER_AGENT) } /** Parses the response body as a Ksoup Document. */ -val NiceResponse.ksoupDocument: Document +val INiceResponse.ksoupDocument: Document get() = Ksoup.parse(text) /** Same as the default app networking helper, but this instance ignores SSL certificates. * This should NEVER be used for sensitive networking operations such as logins. Only use this when required. */ @Prerelease @UnsafeSSL -var insecureApp = (Requests(responseParser = jacksonResponseParser) as NiceResponse).apply { +var insecureApp = Requests(responseParser = jacksonResponseParser).apply { defaultHeaders = mapOf("user-agent" to USER_AGENT) } From f39a802dbc5420ef4a57797fd47c498a71206dc4 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 17:21:40 -0600 Subject: [PATCH 010/116] Try --- .../commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt index 1ec2df4c55c..fef850fa740 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt @@ -21,7 +21,9 @@ import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToLangTagIETF import com.lagradost.cloudstream3.utils.SubtitleHelper.fromLanguageToTagIETF +import com.lagradost.nicehttp.kmp.JsonAsString import com.lagradost.nicehttp.kmp.RequestBodyTypes +import com.lagradost.nicehttp.kmp.parsedSafe import okhttp3.Interceptor import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody @@ -298,9 +300,9 @@ object APIHolder { "sort" to "SEARCH_MATCH", "type" to "ANIME", ) - ).toJson().toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) + ).toJson() - return app.post("https://graphql.anilist.co", requestBody = data) + return app.post("https://graphql.anilist.co", json = JsonAsString(data)) .parsedSafe() } } From 6c34c098efa8fefdd9aa82f1d36332d76019dab0 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 17:29:44 -0600 Subject: [PATCH 011/116] Try --- .../cloudstream3/network/DdosGuardKiller.kt | 70 +++++++++++-------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt index 3ad80de440e..0793956ba9e 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt @@ -2,17 +2,17 @@ package com.lagradost.cloudstream3.network import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app +import com.lagradost.nicehttp.kmp.INiceResponse +import com.lagradost.nicehttp.kmp.Interceptor import com.lagradost.nicehttp.kmp.Requests -import com.lagradost.nicehttp.kmp.cookies -import kotlinx.coroutines.runBlocking -import okhttp3.Interceptor -import okhttp3.Request -import okhttp3.Response +import com.lagradost.nicehttp.kmp.getRequestCookies +import io.ktor.client.request.* +import io.ktor.http.* /** * @param alwaysBypass will pre-emptively fetch ddos guard cookies if true. * If false it will only try to get cookies when a request returns 403 - * */ + */ // As seen in https://github.com/anime-dl/anime-downloader/blob/master/anime_downloader/sites/erairaws.py @AnyThread class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor { @@ -20,38 +20,50 @@ class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor { private var ddosBypassPath: String? = null - override fun intercept(chain: Interceptor.Chain): Response = runBlocking { - val request = chain.request() - if (alwaysBypass) return@runBlocking bypassDdosGuard(request) + override suspend fun intercept(chain: Interceptor.Chain): INiceResponse { + val request = chain.request + if (alwaysBypass) return bypassDdosGuard(request, chain) val response = chain.proceed(request) - return@runBlocking if (response.code == 403) { - bypassDdosGuard(request) + return if (response.code == 403) { + bypassDdosGuard(request, chain) } else response } - private suspend fun bypassDdosGuard(request: Request): Response { + private suspend fun bypassDdosGuard( + request: HttpRequestBuilder, + chain: Interceptor.Chain, + ): INiceResponse { ddosBypassPath = ddosBypassPath ?: Regex("'(.*?)'").find( - app.get( - "https://check.ddos-guard.net/check.js" - ).text + app.get("https://check.ddos-guard.net/check.js").text() )?.groupValues?.get(1) - val cookies = - savedCookiesMap[request.url.host] + val host = request.url.host + val scheme = request.url.protocol.name + + val cookies = savedCookiesMap[host] // If no cookies are found fetch and save em. - ?: (request.url.scheme + "://" + request.url.host + (ddosBypassPath ?: "")).let { - // Somehow app.get fails - Requests().get(it).cookies.also { cookies -> - savedCookiesMap[request.url.host] = cookies - } + ?: "$scheme://$host${ddosBypassPath ?: ""}".let { + // Somehow app.get fails + Requests().get(it).cookies.also { cookies -> + savedCookiesMap[host] = cookies } + } + + // Use getRequestCookies() from commonMain to extract existing cookies + val existingCookies = request.headers.build().getRequestCookies() + val mergedCookies = existingCookies + cookies + + val updatedRequest = HttpRequestBuilder().takeFrom(request).apply { + headers.remove("Cookie") + if (mergedCookies.isNotEmpty()) { + header( + "Cookie", + mergedCookies.entries.joinToString("; ") { "${it.key}=${it.value}" } + ) + } + } - val headers = getHeaders(request.headers.toMap(), cookies + request.cookies) - return app.baseClient.newCall( - request.newBuilder() - .headers(headers) - .build() - ).execute() + return chain.proceed(updatedRequest) } -} \ No newline at end of file +} From b16938de0502814f8e7f312e0fbdadcf5f2fb292 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 17:39:12 -0600 Subject: [PATCH 012/116] Test --- .../cloudstream3/metaproviders/MyDramaList.kt | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt index cf3e28a8de0..0001947c747 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt @@ -28,8 +28,7 @@ import com.lagradost.cloudstream3.newTvSeriesLoadResponse import com.lagradost.cloudstream3.newTvSeriesSearchResponse import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson -import okhttp3.Interceptor -import okhttp3.Response +import com.lagradost.nicehttp.kmp.HeadersInterceptor import java.text.SimpleDateFormat import java.util.Locale @@ -49,20 +48,12 @@ abstract class MyDramaListAPI : MainAPI() { val API_KEY: String = BuildConfig.MDL_API_KEY const val API_HOST = "https://api.mydramalist.com/v1" const val SITE_HOST = "https://mydramalist.com" - private val headerInterceptor = MyDramaListInterceptor() - } - - /** Automatically adds required api headers */ - private class MyDramaListInterceptor : Interceptor { - override fun intercept(chain: Interceptor.Chain): Response { - return chain.proceed( - chain.request().newBuilder() - .removeHeader("user-agent") - .addHeader("user-agent", "Dart/3.6 (dart:io)") - .addHeader("mdl-api-key", API_KEY) - .build() + private val headerInterceptor = HeadersInterceptor( + mapOf( + "user-agent" to "Dart/3.6 (dart:io)", + "mdl-api-key" to API_KEY, ) - } + ) } override val mainPage = mainPageOf( @@ -451,4 +442,4 @@ abstract class MyDramaListAPI : MainAPI() { @JsonProperty("date") val date: String? = null, @JsonProperty("airedDate") val airedDate: String? = null, ) -} \ No newline at end of file +} From 87c543164ca571ae02f8fcd2257eb2f4c099b4c2 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:01:04 -0600 Subject: [PATCH 013/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 59d960ced96..6f912a12edf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "0b802cf910" +nicehttp = "fa707c941e" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From c6c062da4c1ffa6294740072cf3e965ca354e76c Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:10:32 -0600 Subject: [PATCH 014/116] Test --- .../com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt index 950dbfef6c9..8d53eb99054 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt @@ -4,6 +4,7 @@ import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper +import io.ktor.http.toMap open class PlayerVoxzer : ExtractorApi() { @@ -28,4 +29,4 @@ open class PlayerVoxzer : ExtractorApi() { } return sources } -} \ No newline at end of file +} From 3a0a493928f6cbd7708f44a0bc02a360d8b84558 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:18:07 -0600 Subject: [PATCH 015/116] - --- .../kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt index 8d53eb99054..b7a1faf5226 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt @@ -4,7 +4,6 @@ import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper -import io.ktor.http.toMap open class PlayerVoxzer : ExtractorApi() { From 814dcc6a24363cc4813e640c44c73e4be3741db2 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:19:32 -0600 Subject: [PATCH 016/116] - --- .../java/com/lagradost/cloudstream3/network/CloudflareKiller.kt | 2 +- .../lagradost/cloudstream3/network/WebViewResolver.android.kt | 2 +- .../kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt | 2 +- .../com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt | 2 +- .../kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 206cc0ab2f5..a1c1482e923 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -101,7 +101,7 @@ class CloudflareKiller : Interceptor { } ?: emptyMap() val headers = - getHeaders(request.headers.toMap() + userAgentMap, cookies + request.cookies) + getHeaders(request.headersMap + userAgentMap, cookies + request.cookies) return app.baseClient.newCall( request.newBuilder() .headers(headers) diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index 8217cf0c21d..45c740f5ce5 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -253,7 +253,7 @@ actual class WebViewResolver actual constructor( handler?.proceed() // Ignore ssl issues } } - webView?.loadUrl(url, headers.toMap()) + webView?.loadUrl(url, headersMap) } catch (e: Exception) { logError(e) } diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt index 65cf1be4f5b..52212f35a65 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt @@ -24,7 +24,7 @@ open class GenericM3U8 : ExtractorApi() { name, response.url, url, - headers = response.headers.toMap() + headers = response.headersMap ).forEach { link -> sources.add(link) } diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt index b7a1faf5226..e491297b616 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt @@ -22,7 +22,7 @@ open class PlayerVoxzer : ExtractorApi() { name, listm3, url, - headers = app.get(url).headers.toMap() + headers = app.get(url).headersMap ).forEach { link -> sources.add(link) } diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt index 20f0a2b5e4d..d4904883e5b 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt @@ -18,6 +18,6 @@ open class WatchSB : ExtractorApi() { ) ) - return generateM3u8(name, response.url, url, headers = response.headers.toMap()) + return generateM3u8(name, response.url, url, headers = response.headersMap) } } \ No newline at end of file From 35fffa9acec55ceaa427b672a0ea0d4089ff9c36 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:28:41 -0600 Subject: [PATCH 017/116] - --- .../cloudstream3/syncproviders/providers/KitsuApi.kt | 5 +++-- .../kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt | 3 ++- .../kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt | 3 ++- .../com/lagradost/cloudstream3/extractors/GenericM3U8.kt | 3 ++- .../lagradost/cloudstream3/extractors/StreamWishExtractor.kt | 3 ++- .../kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt | 3 ++- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt index 29c3c0c1793..1602b147124 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt @@ -22,6 +22,7 @@ import com.lagradost.cloudstream3.ui.SyncWatchType import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.txt +import com.lagradost.nicehttp.kmp.toNiceInterceptor import okhttp3.Interceptor import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody @@ -87,8 +88,8 @@ class KitsuApi: SyncAPI() { } } - private val apiFallbackInterceptor = FallbackInterceptor(apiUrl, fallbackApiUrl) - private val oauthFallbackInterceptor = FallbackInterceptor(oauthUrl, fallbackOauthUrl) + private val apiFallbackInterceptor = FallbackInterceptor(apiUrl, fallbackApiUrl).toNiceInterceptor() + private val oauthFallbackInterceptor = FallbackInterceptor(oauthUrl, fallbackOauthUrl).toNiceInterceptor() override suspend fun login(form: AuthLoginResponse): AuthToken? { val username = form.email ?: return null diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt index df5e7f794e4..da5787178c9 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt @@ -10,6 +10,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.JsUnpacker import com.lagradost.cloudstream3.utils.M3u8Helper +import com.lagradost.nicehttp.kmp.toNiceInterceptor class FileMoon : FilemoonV2() { @@ -101,7 +102,7 @@ open class FilemoonV2 : ExtractorApi() { val interceptedUrl = app.get( iframeSrcUrl, referer = referer, - interceptor = resolver + interceptor = resolver.toNiceInterceptor() ).url if (interceptedUrl.isNotEmpty()) { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt index a3e4f619a2a..dee4b5e6930 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt @@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.* import com.lagradost.api.Log import com.lagradost.cloudstream3.extractors.helper.JwPlayerHelper import com.lagradost.cloudstream3.network.WebViewResolver +import com.lagradost.nicehttp.kmp.toNiceInterceptor class Multimoviesshg : Filesim() { override var mainUrl = "https://multimoviesshg.com" @@ -94,7 +95,7 @@ open class Filesim : ExtractorApi() { val interceptedUrl = app.get( url = pageResponse.url, referer = referer, - interceptor = resolver + interceptor = resolver.toNiceInterceptor() ).url if (interceptedUrl.isNotEmpty()) { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt index 52212f35a65..885f05834ca 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt @@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.network.WebViewResolver import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper +import com.lagradost.nicehttp.kmp.toNiceInterceptor open class GenericM3U8 : ExtractorApi() { @@ -16,7 +17,7 @@ open class GenericM3U8 : ExtractorApi() { val response = app.get( url, interceptor = WebViewResolver( Regex("""master\.m3u8""") - ) + ).toNiceInterceptor() ) val sources = mutableListOf() if (response.url.contains("m3u8")) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt index 54e21fcb6f8..941491fb63c 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt @@ -12,6 +12,7 @@ import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.getAndUnpack import com.lagradost.cloudstream3.utils.getPacked import com.lagradost.cloudstream3.network.WebViewResolver +import com.lagradost.nicehttp.kmp.toNiceInterceptor class Mwish : StreamWishExtractor() { @@ -194,7 +195,7 @@ open class StreamWishExtractor : ExtractorApi() { val interceptedStreamUrl = app.get( url, referer = referer, - interceptor = webViewM3u8Resolver + interceptor = webViewM3u8Resolver.toNiceInterceptor() ).url if (interceptedStreamUrl.isNotEmpty()) { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt index d4904883e5b..53bfbd47f27 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt @@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.network.WebViewResolver import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper.Companion.generateM3u8 +import com.lagradost.nicehttp.kmp.toNiceInterceptor open class WatchSB : ExtractorApi() { override var name = "WatchSB" @@ -15,7 +16,7 @@ open class WatchSB : ExtractorApi() { val response = app.get( url, interceptor = WebViewResolver( Regex("""master\.m3u8""") - ) + ).toNiceInterceptor() ) return generateM3u8(name, response.url, url, headers = response.headersMap) From b0647022140a68e1d8fb7bd56245c2f4d5321864 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:29:35 -0600 Subject: [PATCH 018/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6f912a12edf..f56ca6576ac 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "fa707c941e" +nicehttp = "8179c05447" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 610af03131d8a5fec3f40edd8c64ba2174e3cd2d Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:46:18 -0600 Subject: [PATCH 019/116] Try fix --- .../com/lagradost/cloudstream3/plugins/RepositoryManager.kt | 1 + .../java/com/lagradost/cloudstream3/plugins/VotingApi.kt | 1 + .../cloudstream3/syncproviders/providers/KitsuApi.kt | 1 + .../lagradost/cloudstream3/syncproviders/providers/MALApi.kt | 1 + .../cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt | 1 + .../cloudstream3/syncproviders/providers/SimklApi.kt | 1 + .../cloudstream3/syncproviders/providers/SubSource.kt | 1 + .../lagradost/cloudstream3/syncproviders/providers/Subdl.kt | 1 + .../java/com/lagradost/cloudstream3/ui/player/Torrent.kt | 1 + .../lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt | 5 +++-- .../main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt | 1 + .../com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt | 1 + .../kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt | 1 + .../kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt | 1 + .../kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt | 1 + .../cloudstream3/extractors/HDPlayerSystemExtractor.kt | 1 + .../kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt | 1 + .../cloudstream3/extractors/PeaceMakerstExtractor.kt | 1 + .../com/lagradost/cloudstream3/extractors/Rabbitstream.kt | 1 + .../cloudstream3/extractors/SobreatsesuypExtractor.kt | 1 + .../kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt | 1 + .../com/lagradost/cloudstream3/extractors/Streamlare.kt | 1 + .../kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt | 1 + .../com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt | 1 + .../lagradost/cloudstream3/extractors/TauVideoExtractor.kt | 1 + .../kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt | 1 + .../kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt | 1 + .../lagradost/cloudstream3/extractors/helper/GogoHelper.kt | 1 + .../lagradost/cloudstream3/extractors/helper/WcoHelper.kt | 1 + .../com/lagradost/cloudstream3/metaproviders/MyDramaList.kt | 1 + 30 files changed, 32 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt index 07d6aaa37bc..713c5182949 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt @@ -17,6 +17,7 @@ import com.lagradost.cloudstream3.plugins.PluginManager.unloadPlugin import com.lagradost.cloudstream3.ui.settings.extensions.REPOSITORIES_KEY import com.lagradost.cloudstream3.ui.settings.extensions.RepositoryData import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson +import com.lagradost.nicehttp.kmp.parsedSafe import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import java.io.File diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt index 85a806f0b12..e145e80013b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt @@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.CloudStreamApp.Companion.context import com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey import com.lagradost.cloudstream3.CloudStreamApp.Companion.setKey import com.lagradost.cloudstream3.R +import com.lagradost.nicehttp.kmp.parsedSafe import java.security.MessageDigest import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.utils.Coroutines.main diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt index 1602b147124..074024e1b62 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt @@ -23,6 +23,7 @@ import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.txt import com.lagradost.nicehttp.kmp.toNiceInterceptor +import com.lagradost.nicehttp.kmp.parsed import okhttp3.Interceptor import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt index ba0195be6b8..852e0e3b6b3 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt @@ -21,6 +21,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.DataStore.toKotlinObject import com.lagradost.cloudstream3.utils.txt +import com.lagradost.nicehttp.kmp.parsed import java.text.SimpleDateFormat import java.time.Instant import java.time.format.DateTimeFormatter diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt index 4b17fdb2920..269633f7d4d 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt @@ -18,6 +18,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToLangTagIETF import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToOpenSubtitlesTag +import com.lagradost.nicehttp.kmp.parsed class OpenSubtitlesApi : SubtitleAPI() { override val name = "OpenSubtitles" diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt index c4095e2d881..77d1abc2c01 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt @@ -32,6 +32,7 @@ import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.DataStoreHelper.toYear import com.lagradost.cloudstream3.utils.txt +import com.lagradost.nicehttp.kmp.parsedSafe import java.math.BigInteger import java.security.SecureRandom import java.text.SimpleDateFormat diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt index 19122768e23..63e9de15255 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt @@ -10,6 +10,7 @@ import com.lagradost.cloudstream3.syncproviders.SubtitleAPI import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.SubtitleHelper +import com.lagradost.nicehttp.kmp.parsedSafe class SubSourceApi : SubtitleAPI() { override val name = "SubSource" diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt index 1f1e6de4450..90bdc985c0a 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt @@ -12,6 +12,7 @@ import com.lagradost.cloudstream3.syncproviders.AuthToken import com.lagradost.cloudstream3.syncproviders.AuthUser import com.lagradost.cloudstream3.syncproviders.SubtitleAPI import com.lagradost.cloudstream3.TvType +import com.lagradost.nicehttp.kmp.parsedSafe class SubDlApi : SubtitleAPI() { override val name = "SubDL" diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt index 2e554f75eaf..6dc217d2191 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt @@ -9,6 +9,7 @@ import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.newExtractorLink +import com.lagradost.nicehttp.kmp.parsed import torrServer.TorrServer import java.io.File import java.net.ConnectException diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt index 6a635e817c9..8f45a423631 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt @@ -3,7 +3,8 @@ package com.lagradost.cloudstream3.ui.search import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError -import com.lagradost.nicehttp.kmp.NiceResponse +import com.lagradost.nicehttp.kmp.INiceResponse +import com.lagradost.nicehttp.kmp.parsed /** * API for fetching search suggestions from external sources. @@ -57,7 +58,7 @@ object SearchSuggestionApi { * Parses the TMDB search response and extracts movie/TV show titles. * Filters to only include movies, TV shows, and anime. */ - private fun parseSuggestions(response: NiceResponse): List { + private fun parseSuggestions(response: INiceResponse): List { return try { val parsed = response.parsed() parsed.results diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt index 351e77c8d72..5e9ba34a527 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt @@ -9,6 +9,7 @@ import com.lagradost.cloudstream3.APIHolder.apis import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.utils.AppUtils.parseJson +import com.lagradost.nicehttp.kmp.parsed import java.util.concurrent.TimeUnit object SyncUtil { diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt index f9254576bb5..5d5a87a1277 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt @@ -17,6 +17,7 @@ import com.lagradost.cloudstream3.syncproviders.PlainAuthRepo import com.lagradost.cloudstream3.ui.result.ResultEpisode import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson +import com.lagradost.nicehttp.kmp.parsed import java.math.BigInteger import java.util.concurrent.ConcurrentHashMap import java.security.MessageDigest diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt index a86c5f01a83..5839b575572 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt @@ -3,6 +3,7 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.utils.* +import com.lagradost.nicehttp.kmp.parsedSafe open class Acefile : ExtractorApi() { override val name = "Acefile" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt index 38d35da2eda..d6274063e7f 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt @@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper +import com.lagradost.nicehttp.kmp.parsedSafe import java.net.URI import java.nio.charset.StandardCharsets import javax.crypto.Cipher diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt index ced827eecb7..3642a7819d2 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt @@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.newExtractorLink +import com.lagradost.nicehttp.kmp.parsedSafe open class Gofile : ExtractorApi() { override val name = "Gofile" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/HDPlayerSystemExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/HDPlayerSystemExtractor.kt index 9cff2049fac..fcadc89573c 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/HDPlayerSystemExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/HDPlayerSystemExtractor.kt @@ -5,6 +5,7 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.api.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* +import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class HDPlayerSystem : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt index bfa94326aae..6466fdb01a4 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt @@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.newExtractorLink +import com.lagradost.nicehttp.kmp.parsedSafe open class Linkbox : ExtractorApi() { override val name = "Linkbox" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt index f96387d75c1..8eb95039258 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt @@ -5,6 +5,7 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.api.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* +import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class PeaceMakerst : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Rabbitstream.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Rabbitstream.kt index 98598dd2865..798ba8ee259 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Rabbitstream.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Rabbitstream.kt @@ -12,6 +12,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper +import com.lagradost.nicehttp.kmp.parsedSafe import java.nio.charset.StandardCharsets import java.security.MessageDigest import javax.crypto.Cipher diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt index be95940e0c1..398c4ec639b 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt @@ -4,6 +4,7 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* +import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class Sobreatsesuyp : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt index 67cf1f8da9c..32134b02ce1 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt @@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.newSubtitleFile import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper +import com.lagradost.nicehttp.kmp.parsedSafe import kotlin.random.Random class Sblona : StreamSB() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt index c1b55fe4493..c8489f64dd0 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt @@ -9,6 +9,7 @@ import com.lagradost.cloudstream3.utils.INFER_TYPE import com.lagradost.cloudstream3.utils.newExtractorLink import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.nicehttp.kmp.RequestBodyTypes +import com.lagradost.nicehttp.kmp.parsed import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt index ea85a005ea0..2f52f3dd858 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt @@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.newExtractorLink +import com.lagradost.nicehttp.kmp.parsed class Streamix(): Streamup() { override val name: String = "Streamix" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt index 1348f74d501..3ed8ee1f029 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt @@ -5,6 +5,7 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.api.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* +import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class TRsTX : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt index 1c9cce2a834..6088d69ae98 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt @@ -5,6 +5,7 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.api.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* +import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class TauVideo : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt index 974549fcbbb..938b9e1501b 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt @@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.newExtractorLink +import com.lagradost.nicehttp.kmp.parsedSafe open class Vicloud : ExtractorApi() { override val name: String = "Vicloud" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt index 65fca1db1da..9e8437541df 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt @@ -9,6 +9,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.newExtractorLink +import com.lagradost.nicehttp.kmp.parsed class VinovoSi : VinovoTo() { override var name = "VinovoSi" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt index c7541842fe3..3ea9e897fd0 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt @@ -14,6 +14,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.newExtractorLink +import com.lagradost.nicehttp.kmp.parsedSafe import java.net.URI import javax.crypto.Cipher import javax.crypto.spec.IvParameterSpec diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt index 35aec2b1d46..4a02d218470 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt @@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.extractors.helper import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.app +import com.lagradost.nicehttp.kmp.parsedSafe class WcoHelper { companion object { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt index 0001947c747..914541b1805 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt @@ -29,6 +29,7 @@ import com.lagradost.cloudstream3.newTvSeriesSearchResponse import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.nicehttp.kmp.HeadersInterceptor +import com.lagradost.nicehttp.kmp.parsedSafe import java.text.SimpleDateFormat import java.util.Locale From 23b5af1105505e37a5ce38bc00aaa8fb0bc61241 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:49:23 -0600 Subject: [PATCH 020/116] update --- .../kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt index fee9ebd6493..76f831e37de 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt @@ -10,6 +10,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.getAndUnpack import com.lagradost.cloudstream3.utils.getPacked +import com.lagradost.nicehttp.kmp.parsed open class Jeniusplay : ExtractorApi() { override val name = "Jeniusplay" From e4a6251dc125e89852e4249d6903421784d8faec Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:51:18 -0600 Subject: [PATCH 021/116] Update --- .../java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt | 1 + .../com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt | 1 + .../com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt | 1 + .../com/lagradost/cloudstream3/metaproviders/MyDramaList.kt | 1 + 4 files changed, 4 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt index 0db90afeaef..b799e0f1532 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt @@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.getMalId import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.ui.result.ResultEpisode +import com.lagradost.nicehttp.kmp.parsed // taken from https://github.com/saikou-app/saikou/blob/3803f8a7a59b826ca193664d46af3a22bbc989f7/app/src/main/java/ani/saikou/others/AniSkip.kt // the following is GPLv3 code https://github.com/saikou-app/saikou/blob/main/LICENSE.md diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt index 869515f4390..a940b3d2769 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt @@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.getImdbId import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.ui.result.ResultEpisode +import com.lagradost.nicehttp.kmp.parsed class IntroDbSkip : SkipAPI() { override val name = "IntroDb" diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt index cc2661cb096..1e9515c4543 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt @@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.isMovie import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.ui.result.ResultEpisode import com.lagradost.cloudstream3.app +import com.lagradost.nicehttp.kmp.parsed /** https://theintrodb.org/docs */ class TheIntroDBSkip : SkipAPI() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt index 914541b1805..dc38b7c80bc 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt @@ -29,6 +29,7 @@ import com.lagradost.cloudstream3.newTvSeriesSearchResponse import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.nicehttp.kmp.HeadersInterceptor +import com.lagradost.nicehttp.kmp.parsed import com.lagradost.nicehttp.kmp.parsedSafe import java.text.SimpleDateFormat import java.util.Locale From 17121eab4f4fba56c03d00753fad0ebb5c199911 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:54:08 -0600 Subject: [PATCH 022/116] Update --- .../kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt index 3aa7eb25282..e442ab789c5 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt @@ -3,7 +3,7 @@ package com.lagradost.cloudstream3.utils import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode import com.lagradost.cloudstream3.ksoupDocument -import com.lagradost.nicehttp.kmp.NiceResponse +import com.lagradost.nicehttp.kmp.INiceResponse import java.net.URI import java.net.URLDecoder @@ -108,7 +108,7 @@ object ShortLink { } suspend fun unshortenLinkup(uri: String): String { - var r: NiceResponse? = null + var r: INiceResponse? = null var uri = uri when { uri.contains("/tv/") -> uri = uri.replace("/tv/", "/tva/") From f45a13836358f9792965ab42b1a6e04ba5a668a1 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 19:57:10 -0600 Subject: [PATCH 023/116] Update --- .../lagradost/cloudstream3/network/WebViewResolver.android.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index 45c740f5ce5..8217cf0c21d 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -253,7 +253,7 @@ actual class WebViewResolver actual constructor( handler?.proceed() // Ignore ssl issues } } - webView?.loadUrl(url, headersMap) + webView?.loadUrl(url, headers.toMap()) } catch (e: Exception) { logError(e) } From 1df2815f3e1a57eb058abe22e964facde6df399f Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 8 May 2026 22:26:08 -0600 Subject: [PATCH 024/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f56ca6576ac..7327485e267 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "8179c05447" +nicehttp = "699f7edf18" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 88b5fcfbd361b35d77cde1ea5fb4ab997eef681a Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 11:08:00 -0600 Subject: [PATCH 025/116] - --- .../commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt index fef850fa740..79675ff29df 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt @@ -171,8 +171,7 @@ object APIHolder { val vToken = app.get( "https://www.google.com/recaptcha/api.js?render=$key", - referer = referer, - cacheTime = 0 + referer = referer ) .text .substringAfter("releases/") @@ -191,7 +190,7 @@ object APIHolder { "co" to domain, "sa" to "", "reason" to "q" - ), cacheTime = 0 + ) ).text .substringAfter("rresp\",\"") .substringBefore("\"") From e1b64a36904be076a68271e3bbcd9249560cb9c8 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 11:10:24 -0600 Subject: [PATCH 026/116] Update --- .../com/lagradost/cloudstream3/extractors/Streamlare.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt index c8489f64dd0..7b3f07cb0f2 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt @@ -8,10 +8,9 @@ import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.INFER_TYPE import com.lagradost.cloudstream3.utils.newExtractorLink import com.lagradost.cloudstream3.utils.Qualities +import com.lagradost.nicehttp.kmp.JsonAsString import com.lagradost.nicehttp.kmp.RequestBodyTypes import com.lagradost.nicehttp.kmp.parsed -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.RequestBody.Companion.toRequestBody class Streamlare : Slmaxed() { @@ -45,7 +44,7 @@ open class Slmaxed : ExtractorApi() { val id = embedRegex.find(url)!!.groupValues[1] val json = app.post( "${mainUrl}api/video/stream/get", - requestBody = """{"id":"$id"}""".toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) + json = JsonAsString("""{"id":"$id"}""") ).parsed() return json.result?.mapNotNull { it.value.let { result -> @@ -67,4 +66,4 @@ open class Slmaxed : ExtractorApi() { } } } -} \ No newline at end of file +} From ac484bb54d2a71962e6a7c0dcad44f459bbdb02c Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 11:13:31 -0600 Subject: [PATCH 027/116] - --- .../com/lagradost/cloudstream3/utils/M3u8Helper.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/M3u8Helper.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/M3u8Helper.kt index 23226418b48..b493dc05935 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/M3u8Helper.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/M3u8Helper.kt @@ -128,7 +128,7 @@ object M3u8Helper2 { returnThis: Boolean = true ): List { val list = mutableListOf() - val response = app.get(m3u8.streamUrl, headers = m3u8.headers, verify = false).text + val response = app.get(m3u8.streamUrl, headers = m3u8.headers).text val parsed = HlsPlaylistParser.parse( m3u8.streamUrl, response, @@ -232,7 +232,7 @@ object M3u8Helper2 { if (index < 0 || index >= size) throw IllegalArgumentException("index must be in the bounds of the ts") val ts = allTsLinks[index] - val tsResponse = app.get(ts.url, headers = headers, verify = false) + val tsResponse = app.get(ts.url, headers = headers) val body = tsResponse.body val tsData = body.bytes() body.close() @@ -264,8 +264,7 @@ object M3u8Helper2 { val playlistResponse = app.get( playlistStream.streamUrl, - headers = playlistStream.headers, - verify = false + headers = playlistStream.headers ).text val parsed = HlsPlaylistParser.parse(playlistStream.streamUrl, playlistResponse) @@ -330,7 +329,7 @@ object M3u8Helper2 { encryptionIv = match[3].toByteArray() val encryptionKeyResponse = - app.get(encryptionUri, headers = playlistStream.headers, verify = false) + app.get(encryptionUri, headers = playlistStream.headers) val body = encryptionKeyResponse.body encryptionData = body.bytes() body.close() From 3befb8fcfa3d5c96c1918c5a1527d98ed416b7b0 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 11:15:44 -0600 Subject: [PATCH 028/116] Update --- .../kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt index bbbd11a8cc5..f67d15da021 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt @@ -308,6 +308,7 @@ import com.lagradost.cloudstream3.extractors.Zplayer import com.lagradost.cloudstream3.extractors.ZplayerV2 import com.lagradost.cloudstream3.extractors.Ztreamhub import com.lagradost.cloudstream3.mvvm.logError +import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.ensureActive @@ -649,7 +650,7 @@ constructor( videoSize = videoSize ?: runCatching { val response = - app.head(this.url, headers = headers, referer = referer, timeout = timeoutSeconds) + app.head(this.url, headers = headers, referer = referer, timeout = timeoutSeconds.seconds) response.headers["Content-Length"]?.toLong() }.getOrNull() From 124aa264ca1d9751435bcb054b0faed4fa045d39 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 11:22:12 -0600 Subject: [PATCH 029/116] Update --- .../cloudstream3/network/WebViewResolver.android.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index 8217cf0c21d..ed48018602d 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -15,6 +15,7 @@ import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.runOnMainThread import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf import com.lagradost.nicehttp.kmp.requestCreator +import io.ktor.http.HttpResponse import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking import okhttp3.Interceptor @@ -293,16 +294,16 @@ fun WebResourceRequest.toRequest(): Request? { } } -fun Response.toWebResourceResponse(): WebResourceResponse { - val contentTypeValue = this.header("Content-Type") +fun HttpResponse.toWebResourceResponse(): WebResourceResponse { + val contentTypeValue = headers["Content-Type"] // 1. contentType. 2. charset val typeRegex = Regex("""(.*);(?:.*charset=(.*)(?:|;)|)""") return if (contentTypeValue != null) { val found = typeRegex.find(contentTypeValue) val contentType = found?.groupValues?.getOrNull(1)?.ifBlank { null } ?: contentTypeValue val charset = found?.groupValues?.getOrNull(2)?.ifBlank { null } - WebResourceResponse(contentType, charset, this.body.byteStream()) + WebResourceResponse(contentType, charset, runBlocking { readRawBytes() }.inputStream()) } else { - WebResourceResponse("application/octet-stream", null, this.body.byteStream()) + WebResourceResponse("application/octet-stream", null, runBlocking { readRawBytes() }.inputStream()) } } From 97be18a42e6d56c509eb41e654731783d13d3e3b Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 14:39:23 -0600 Subject: [PATCH 030/116] Update --- .../cloudstream3/network/WebViewResolver.android.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index ed48018602d..d9ccb24b4af 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -14,8 +14,8 @@ import com.lagradost.cloudstream3.utils.Coroutines.main import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.runOnMainThread import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf +import com.lagradost.nicehttp.kmp.INiceResponse import com.lagradost.nicehttp.kmp.requestCreator -import io.ktor.http.HttpResponse import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking import okhttp3.Interceptor @@ -228,12 +228,12 @@ actual class WebViewResolver actual constructor( useOkhttp && request.method == "GET" -> app.get( webViewUrl, headers = request.requestHeaders - ).okhttpResponse.toWebResourceResponse() + ).toWebResourceResponse() useOkhttp && request.method == "POST" -> app.post( webViewUrl, headers = request.requestHeaders - ).okhttpResponse.toWebResourceResponse() + ).toWebResourceResponse() else -> super.shouldInterceptRequest( view, @@ -294,7 +294,7 @@ fun WebResourceRequest.toRequest(): Request? { } } -fun HttpResponse.toWebResourceResponse(): WebResourceResponse { +fun INiceResponse.toWebResourceResponse(): WebResourceResponse { val contentTypeValue = headers["Content-Type"] // 1. contentType. 2. charset val typeRegex = Regex("""(.*);(?:.*charset=(.*)(?:|;)|)""") @@ -302,8 +302,8 @@ fun HttpResponse.toWebResourceResponse(): WebResourceResponse { val found = typeRegex.find(contentTypeValue) val contentType = found?.groupValues?.getOrNull(1)?.ifBlank { null } ?: contentTypeValue val charset = found?.groupValues?.getOrNull(2)?.ifBlank { null } - WebResourceResponse(contentType, charset, runBlocking { readRawBytes() }.inputStream()) + WebResourceResponse(contentType, charset, body.bytes().inputStream()) } else { - WebResourceResponse("application/octet-stream", null, runBlocking { readRawBytes() }.inputStream()) + WebResourceResponse("application/octet-stream", null, body.bytes().inputStream()) } } From 1e39c4b7aab9471c8175a76133b2a4fd939400b0 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 14:46:15 -0600 Subject: [PATCH 031/116] Fix --- .../com/lagradost/cloudstream3/network/CloudflareKiller.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index a1c1482e923..24889a67347 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -101,7 +101,7 @@ class CloudflareKiller : Interceptor { } ?: emptyMap() val headers = - getHeaders(request.headersMap + userAgentMap, cookies + request.cookies) + getHeaders(request.headers.toMap() + userAgentMap, cookies + request.cookies) return app.baseClient.newCall( request.newBuilder() .headers(headers) @@ -135,4 +135,4 @@ class CloudflareKiller : Interceptor { val cookies = savedCookies[request.url.host] ?: return null return proceed(request, cookies) } -} \ No newline at end of file +} From 92b4f7a7eaba8ea1962ee81c7a29d780a4869469 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 16:20:09 -0600 Subject: [PATCH 032/116] Update --- .../com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt index 8f45a423631..85d161bc92a 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt @@ -58,7 +58,7 @@ object SearchSuggestionApi { * Parses the TMDB search response and extracts movie/TV show titles. * Filters to only include movies, TV shows, and anime. */ - private fun parseSuggestions(response: INiceResponse): List { + private suspend fun parseSuggestions(response: INiceResponse): List { return try { val parsed = response.parsed() parsed.results From 260281b2d13980faadf4b289a613ae94deb229e8 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 16:21:02 -0600 Subject: [PATCH 033/116] - --- .../kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt index f67d15da021..bbbd11a8cc5 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt @@ -308,7 +308,6 @@ import com.lagradost.cloudstream3.extractors.Zplayer import com.lagradost.cloudstream3.extractors.ZplayerV2 import com.lagradost.cloudstream3.extractors.Ztreamhub import com.lagradost.cloudstream3.mvvm.logError -import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.ensureActive @@ -650,7 +649,7 @@ constructor( videoSize = videoSize ?: runCatching { val response = - app.head(this.url, headers = headers, referer = referer, timeout = timeoutSeconds.seconds) + app.head(this.url, headers = headers, referer = referer, timeout = timeoutSeconds) response.headers["Content-Length"]?.toLong() }.getOrNull() From 0abaa4db083e93b7de3ea5236020864e749c6822 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 16:23:25 -0600 Subject: [PATCH 034/116] - --- .../commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt index 79675ff29df..fef850fa740 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt @@ -171,7 +171,8 @@ object APIHolder { val vToken = app.get( "https://www.google.com/recaptcha/api.js?render=$key", - referer = referer + referer = referer, + cacheTime = 0 ) .text .substringAfter("releases/") @@ -190,7 +191,7 @@ object APIHolder { "co" to domain, "sa" to "", "reason" to "q" - ) + ), cacheTime = 0 ).text .substringAfter("rresp\",\"") .substringBefore("\"") From ced0abfa85903c39a870b0299202a4253940373d Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 16:24:29 -0600 Subject: [PATCH 035/116] - --- .../com/lagradost/cloudstream3/utils/M3u8Helper.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/M3u8Helper.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/M3u8Helper.kt index b493dc05935..23226418b48 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/M3u8Helper.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/M3u8Helper.kt @@ -128,7 +128,7 @@ object M3u8Helper2 { returnThis: Boolean = true ): List { val list = mutableListOf() - val response = app.get(m3u8.streamUrl, headers = m3u8.headers).text + val response = app.get(m3u8.streamUrl, headers = m3u8.headers, verify = false).text val parsed = HlsPlaylistParser.parse( m3u8.streamUrl, response, @@ -232,7 +232,7 @@ object M3u8Helper2 { if (index < 0 || index >= size) throw IllegalArgumentException("index must be in the bounds of the ts") val ts = allTsLinks[index] - val tsResponse = app.get(ts.url, headers = headers) + val tsResponse = app.get(ts.url, headers = headers, verify = false) val body = tsResponse.body val tsData = body.bytes() body.close() @@ -264,7 +264,8 @@ object M3u8Helper2 { val playlistResponse = app.get( playlistStream.streamUrl, - headers = playlistStream.headers + headers = playlistStream.headers, + verify = false ).text val parsed = HlsPlaylistParser.parse(playlistStream.streamUrl, playlistResponse) @@ -329,7 +330,7 @@ object M3u8Helper2 { encryptionIv = match[3].toByteArray() val encryptionKeyResponse = - app.get(encryptionUri, headers = playlistStream.headers) + app.get(encryptionUri, headers = playlistStream.headers, verify = false) val body = encryptionKeyResponse.body encryptionData = body.bytes() body.close() From 59ca22637bb82c8739b174cdf893f7afbc8fe77a Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 16:40:22 -0600 Subject: [PATCH 036/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7327485e267..4dc0ff8f80d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "699f7edf18" +nicehttp = "47408992b5" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 7216821ffb02f5df10f7775e5d06121c98c3c3f3 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 19:21:41 -0600 Subject: [PATCH 037/116] Use ktor interceptor --- .../cloudstream3/network/DdosGuardKiller.kt | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt index 0793956ba9e..6ed15e38e52 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt @@ -2,10 +2,11 @@ package com.lagradost.cloudstream3.network import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app -import com.lagradost.nicehttp.kmp.INiceResponse +import com.lagradost.nicehttp.kmp.HttpSendInterceptorContext import com.lagradost.nicehttp.kmp.Interceptor import com.lagradost.nicehttp.kmp.Requests import com.lagradost.nicehttp.kmp.getRequestCookies +import io.ktor.client.call.* import io.ktor.client.request.* import io.ktor.http.* @@ -20,20 +21,20 @@ class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor { private var ddosBypassPath: String? = null - override suspend fun intercept(chain: Interceptor.Chain): INiceResponse { - val request = chain.request - if (alwaysBypass) return bypassDdosGuard(request, chain) + override suspend fun intercept(ctx: HttpSendInterceptorContext): HttpClientCall { + val request = ctx.request + if (alwaysBypass) return bypassDdosGuard(request, ctx) - val response = chain.proceed(request) - return if (response.code == 403) { - bypassDdosGuard(request, chain) - } else response + val call = ctx.proceed() + return if (call.response.status.value == 403) { + bypassDdosGuard(request, ctx) + } else call } private suspend fun bypassDdosGuard( request: HttpRequestBuilder, - chain: Interceptor.Chain, - ): INiceResponse { + ctx: HttpSendInterceptorContext, + ): HttpClientCall { ddosBypassPath = ddosBypassPath ?: Regex("'(.*?)'").find( app.get("https://check.ddos-guard.net/check.js").text() )?.groupValues?.get(1) @@ -54,7 +55,7 @@ class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor { val existingCookies = request.headers.build().getRequestCookies() val mergedCookies = existingCookies + cookies - val updatedRequest = HttpRequestBuilder().takeFrom(request).apply { + return ctx.proceed { headers.remove("Cookie") if (mergedCookies.isNotEmpty()) { header( @@ -63,7 +64,5 @@ class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor { ) } } - - return chain.proceed(updatedRequest) } } From b56647231a9ba3dac55920498fa392e9ccff0822 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 19:33:29 -0600 Subject: [PATCH 038/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4dc0ff8f80d..964b2fac03d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "47408992b5" +nicehttp = "a897e5835b" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From e1def476abf62d23ee6ca9443de3064e5db5a36f Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 19:42:09 -0600 Subject: [PATCH 039/116] - --- .../lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt | 4 ++-- .../lagradost/cloudstream3/network/WebViewResolver.android.kt | 4 ++-- .../kotlin/com/lagradost/cloudstream3/MainActivity.kt | 4 ++-- .../kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt index 85d161bc92a..2064662c543 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt @@ -3,7 +3,7 @@ package com.lagradost.cloudstream3.ui.search import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError -import com.lagradost.nicehttp.kmp.INiceResponse +import com.lagradost.nicehttp.kmp.NiceResponse import com.lagradost.nicehttp.kmp.parsed /** @@ -58,7 +58,7 @@ object SearchSuggestionApi { * Parses the TMDB search response and extracts movie/TV show titles. * Filters to only include movies, TV shows, and anime. */ - private suspend fun parseSuggestions(response: INiceResponse): List { + private suspend fun parseSuggestions(response: NiceResponse): List { return try { val parsed = response.parsed() parsed.results diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index d9ccb24b4af..98ce49b8f15 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -14,7 +14,7 @@ import com.lagradost.cloudstream3.utils.Coroutines.main import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.runOnMainThread import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf -import com.lagradost.nicehttp.kmp.INiceResponse +import com.lagradost.nicehttp.kmp.NiceResponse import com.lagradost.nicehttp.kmp.requestCreator import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking @@ -294,7 +294,7 @@ fun WebResourceRequest.toRequest(): Request? { } } -fun INiceResponse.toWebResourceResponse(): WebResourceResponse { +fun NiceResponse.toWebResourceResponse(): WebResourceResponse { val contentTypeValue = headers["Content-Type"] // 1. contentType. 2. charset val typeRegex = Regex("""(.*);(?:.*charset=(.*)(?:|;)|)""") diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt index b3894571205..8b9102ea596 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt @@ -5,7 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fleeksoft.ksoup.Ksoup import com.fleeksoft.ksoup.nodes.Document -import com.lagradost.nicehttp.kmp.INiceResponse +import com.lagradost.nicehttp.kmp.NiceResponse import com.lagradost.nicehttp.kmp.Requests import com.lagradost.nicehttp.kmp.ResponseParser import kotlin.reflect.KClass @@ -41,7 +41,7 @@ var app = Requests(responseParser = jacksonResponseParser).apply { } /** Parses the response body as a Ksoup Document. */ -val INiceResponse.ksoupDocument: Document +val NiceResponse.ksoupDocument: Document get() = Ksoup.parse(text) /** Same as the default app networking helper, but this instance ignores SSL certificates. diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt index e442ab789c5..3aa7eb25282 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt @@ -3,7 +3,7 @@ package com.lagradost.cloudstream3.utils import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode import com.lagradost.cloudstream3.ksoupDocument -import com.lagradost.nicehttp.kmp.INiceResponse +import com.lagradost.nicehttp.kmp.NiceResponse import java.net.URI import java.net.URLDecoder @@ -108,7 +108,7 @@ object ShortLink { } suspend fun unshortenLinkup(uri: String): String { - var r: INiceResponse? = null + var r: NiceResponse? = null var uri = uri when { uri.contains("/tv/") -> uri = uri.replace("/tv/", "/tva/") From 21f055e120a8b82c64d43a7689c1dd79cda0a58f Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:07:03 -0600 Subject: [PATCH 040/116] Try --- .../cloudstream3/network/RequestsHelper.kt | 69 +++++++++++-------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt index 18ae431179f..5271c9eaa2f 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt @@ -8,9 +8,13 @@ import com.lagradost.cloudstream3.USER_AGENT import com.lagradost.cloudstream3.mvvm.safe import com.lagradost.nicehttp.kmp.Requests import com.lagradost.nicehttp.kmp.ignoreAllSSLErrors +import io.ktor.client.* +import io.ktor.client.engine.okhttp.* +import io.ktor.client.plugins.* +import io.ktor.client.plugins.cache.* +import io.ktor.http.Headers +import io.ktor.http.headers import okhttp3.Cache -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders import okhttp3.OkHttpClient import org.conscrypt.Conscrypt import java.io.File @@ -18,48 +22,42 @@ import java.security.Security // Backwards compatible constructor, mark as deprecated later fun Requests.initClient(context: Context) { - this.baseClient = buildDefaultClient(context) + this.baseClient = buildDefaultKtorClient(context) } -/** Only use ignoreSSL if you know what you are doing*/ +/** Only use ignoreSSL if you know what you are doing */ @Prerelease fun Requests.initClient(context: Context, ignoreSSL: Boolean = false) { - this.baseClient = buildDefaultClient(context, ignoreSSL) + this.baseClient = buildDefaultKtorClient(context, ignoreSSL) } - // Backwards compatible constructor, mark as deprecated later fun buildDefaultClient(context: Context): OkHttpClient { return buildDefaultClient(context, false) } -/** Only use ignoreSSL if you know what you are doing*/ +/** Only use ignoreSSL if you know what you are doing */ @Prerelease fun buildDefaultClient(context: Context, ignoreSSL: Boolean = false): OkHttpClient { safe { Security.insertProviderAt(Conscrypt.newProvider(), 1) } - + val settingsManager = PreferenceManager.getDefaultSharedPreferences(context) val dns = settingsManager.getInt(context.getString(R.string.dns_pref), 0) - val baseClient = OkHttpClient.Builder() + + return OkHttpClient.Builder() .followRedirects(true) .followSslRedirects(true) - .apply { - if (ignoreSSL) { - ignoreAllSSLErrors() - } - } + .apply { if (ignoreSSL) ignoreAllSSLErrors() } .cache( - // Note that you need to add a ResponseInterceptor to make this 100% active. - // The server response dictates if and when stuff should be cached. Cache( directory = File(context.cacheDir, "http_cache"), maxSize = 50L * 1024L * 1024L // 50 MiB ) - ).apply { + ) + .apply { when (dns) { 1 -> addGoogleDns() 2 -> addCloudFlareDns() -// 3 -> addOpenDns() 4 -> addAdGuardDns() 5 -> addDNSWatchDns() 6 -> addQuad9Dns() @@ -67,9 +65,23 @@ fun buildDefaultClient(context: Context, ignoreSSL: Boolean = false): OkHttpClie 8 -> addCanadianShieldDns() } } - // Needs to be build as otherwise the other builders will change this object .build() - return baseClient +} + +/** + * Builds a Ktor [HttpClient] using the OkHttp engine configured with the same + * settings as [buildDefaultClient] — cache, DNS, SSL, etc. + */ +fun buildDefaultKtorClient(context: Context, ignoreSSL: Boolean = false): HttpClient { + val okHttpClient = buildDefaultClient(context, ignoreSSL) + return HttpClient(OkHttp) { + install(HttpTimeout) + install(HttpCache) + install(HttpRequestRetry) { noRetry() } + engine { + preconfigured = okHttpClient + } + } } private val DEFAULT_HEADERS = mapOf("user-agent" to USER_AGENT) @@ -80,13 +92,10 @@ private val DEFAULT_HEADERS = mapOf("user-agent" to USER_AGENT) */ fun getHeaders( headers: Map, - cookie: Map -): Headers { - val cookieMap = - if (cookie.isNotEmpty()) mapOf( - "Cookie" to cookie.entries.joinToString(" ") { - "${it.key}=${it.value};" - }) else mapOf() - val tempHeaders = (DEFAULT_HEADERS + headers + cookieMap) - return tempHeaders.toHeaders() -} \ No newline at end of file + cookie: Map, +): Headers = headers { + (DEFAULT_HEADERS + headers).forEach { (k, v) -> append(k, v) } + if (cookie.isNotEmpty()) { + append("Cookie", cookie.entries.joinToString(" ") { "${it.key}=${it.value};" }) + } +} From dd124d76198571e985e20f863bbb993f8f08f5f4 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:09:28 -0600 Subject: [PATCH 041/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 964b2fac03d..3925728d30e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "a897e5835b" +nicehttp = "8de5b5b094" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From f80f8861d52aa1fee763eb9160b13b2bea402398 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:25:49 -0600 Subject: [PATCH 042/116] Fix --- .../lagradost/cloudstream3/plugins/RepositoryManager.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt index 713c5182949..52cbbfa41cd 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt @@ -178,12 +178,9 @@ object RepositoryManager { // Prevent corrupting the plugin file if the operation fails val tempFile = File.createTempFile(file.name, ".tmp", context.cacheDir) - val body = app.get(convertRawGitUrl(pluginUrl)).okhttpResponse.body - - body.byteStream().use { body -> - tempFile.outputStream().use { fileSteam -> - body.copyTo(fileSteam) - } + val bodyBytes = app.get(convertRawGitUrl(pluginUrl)).body.bytes + tempFile.outputStream().use { fileStream -> + fileStream.write(bodyBytes) } if (expectedFileHash != null) { From b59f3b06641965b61c553f3bfe5b2a9993a0d8ce Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:29:55 -0600 Subject: [PATCH 043/116] Fix --- .../com/lagradost/cloudstream3/plugins/RepositoryManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt index 52cbbfa41cd..8ece2d04274 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt @@ -178,7 +178,7 @@ object RepositoryManager { // Prevent corrupting the plugin file if the operation fails val tempFile = File.createTempFile(file.name, ".tmp", context.cacheDir) - val bodyBytes = app.get(convertRawGitUrl(pluginUrl)).body.bytes + val bodyBytes = app.get(convertRawGitUrl(pluginUrl)).body.bytes() tempFile.outputStream().use { fileStream -> fileStream.write(bodyBytes) } From c045f6492505ee0ca6ffce1ade46708f545f3b16 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:31:47 -0600 Subject: [PATCH 044/116] Fix --- .../com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt index 90bdc985c0a..7e5ae065044 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt @@ -12,6 +12,7 @@ import com.lagradost.cloudstream3.syncproviders.AuthToken import com.lagradost.cloudstream3.syncproviders.AuthUser import com.lagradost.cloudstream3.syncproviders.SubtitleAPI import com.lagradost.cloudstream3.TvType +import com.lagradost.nicehttp.kmp.parsed import com.lagradost.nicehttp.kmp.parsedSafe class SubDlApi : SubtitleAPI() { From 0b35f854b0114b91002851ea1f944e71374475a5 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:32:42 -0600 Subject: [PATCH 045/116] Fix --- .../lagradost/cloudstream3/syncproviders/providers/SimklApi.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt index 77d1abc2c01..a20172471d4 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt @@ -32,6 +32,7 @@ import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.DataStoreHelper.toYear import com.lagradost.cloudstream3.utils.txt +import com.lagradost.nicehttp.kmp.parsed import com.lagradost.nicehttp.kmp.parsedSafe import java.math.BigInteger import java.security.SecureRandom From 60ee97f0ccc141d7c62f49c874c377110f5941ca Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:36:31 -0600 Subject: [PATCH 046/116] Update --- .../cloudstream3/network/CloudflareKiller.kt | 135 ++++++++++-------- 1 file changed, 76 insertions(+), 59 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 24889a67347..a41bfcd317c 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -6,22 +6,22 @@ import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe -import com.lagradost.nicehttp.kmp.Requests.Companion.await -import com.lagradost.nicehttp.kmp.cookies -import kotlinx.coroutines.runBlocking -import okhttp3.Headers -import okhttp3.Interceptor -import okhttp3.Request -import okhttp3.Response +import com.lagradost.nicehttp.kmp.HttpSendInterceptorContext +import com.lagradost.nicehttp.kmp.Interceptor +import com.lagradost.nicehttp.kmp.buildHeaders +import com.lagradost.nicehttp.kmp.getRequestCookies +import io.ktor.client.call.* +import io.ktor.client.request.* +import io.ktor.http.* import java.net.URI - @AnyThread class CloudflareKiller : Interceptor { companion object { const val TAG = "CloudflareKiller" private val ERROR_CODES = listOf(403, 503) private val CLOUDFLARE_SERVERS = listOf("cloudflare-nginx", "cloudflare") + fun parseCookieMap(cookie: String): Map { return cookie.split(";").associate { val split = it.split("=") @@ -42,38 +42,43 @@ class CloudflareKiller : Interceptor { /** * Gets the headers with cookies, webview user agent included! - * */ + */ fun getCookieHeaders(url: String): Headers { val userAgentHeaders = WebViewResolver.webViewUserAgent?.let { mapOf("user-agent" to it) } ?: emptyMap() - - return getHeaders(userAgentHeaders, savedCookies[URI(url).host] ?: emptyMap()) + return buildHeaders( + userAgentHeaders, + referer = null, + cookie = savedCookies[URI(url).host] ?: emptyMap() + ) } - override fun intercept(chain: Interceptor.Chain): Response = runBlocking { - val request = chain.request() - - when (val cookies = savedCookies[request.url.host]) { - null -> { - val response = chain.proceed(request) - if(!(response.header("Server") in CLOUDFLARE_SERVERS && response.code in ERROR_CODES)) { - return@runBlocking response - } else { - response.close() - bypassCloudflare(request)?.let { - Log.d(TAG, "Succeeded bypassing cloudflare: ${request.url}") - return@runBlocking it - } - } - } - else -> { - return@runBlocking proceed(request, cookies) - } + override suspend fun intercept(ctx: HttpSendInterceptorContext): HttpClientCall { + val request = ctx.request + val host = request.url.host + + val cookies = savedCookies[host] + if (cookies != null) { + return proceed(request, cookies, ctx) } - debugWarning({ true }) { "Failed cloudflare at: ${request.url}" } - return@runBlocking chain.proceed(request) + val call = ctx.proceed() + val serverHeader = call.response.headers["Server"] + val code = call.response.status.value + + if (!(serverHeader in CLOUDFLARE_SERVERS && code in ERROR_CODES)) { + return call + } + + // Cloudflare detected — try to bypass + bypassCloudflare(request, ctx)?.let { + Log.d(TAG, "Succeeded bypassing cloudflare: ${request.url.buildString()}") + return it + } + + debugWarning({ true }) { "Failed cloudflare at: ${request.url.buildString()}" } + return ctx.proceed() } private fun getWebViewCookie(url: String): String? { @@ -83,56 +88,68 @@ class CloudflareKiller : Interceptor { } /** - * Returns true if the cf cookies were successfully fetched from the CookieManager + * Returns true if the cf cookies were successfully fetched from the CookieManager. * Also saves the cookies. - * */ - private fun trySolveWithSavedCookies(request: Request): Boolean { - // Not sure if this takes expiration into account - return getWebViewCookie(request.url.toString())?.let { cookie -> + */ + private fun trySolveWithSavedCookies(url: String, host: String): Boolean { + return getWebViewCookie(url)?.let { cookie -> cookie.contains("cf_clearance").also { solved -> - if (solved) savedCookies[request.url.host] = parseCookieMap(cookie) + if (solved) savedCookies[host] = parseCookieMap(cookie) } } ?: false } - private suspend fun proceed(request: Request, cookies: Map): Response { + private suspend fun proceed( + request: HttpRequestBuilder, + cookies: Map, + ctx: HttpSendInterceptorContext, + ): HttpClientCall { val userAgentMap = WebViewResolver.getWebViewUserAgent()?.let { mapOf("user-agent" to it) } ?: emptyMap() - val headers = - getHeaders(request.headers.toMap() + userAgentMap, cookies + request.cookies) - return app.baseClient.newCall( - request.newBuilder() - .headers(headers) - .build() - ).await() + val existingCookies = request.headers.build().getRequestCookies() + val mergedCookies = existingCookies + cookies + + return ctx.proceed { + userAgentMap.forEach { (k, v) -> + headers.remove(k) + headers.append(k, v) + } + headers.remove("Cookie") + if (mergedCookies.isNotEmpty()) { + header( + "Cookie", + mergedCookies.entries.joinToString("; ") { "${it.key}=${it.value}" } + ) + } + } } - private suspend fun bypassCloudflare(request: Request): Response? { - val url = request.url.toString() + private suspend fun bypassCloudflare( + request: HttpRequestBuilder, + ctx: HttpSendInterceptorContext, + ): HttpClientCall? { + val url = request.url.buildString() + val host = request.url.host - // If no cookies then try to get them - // Remove this if statement if cookies expire - if (!trySolveWithSavedCookies(request)) { - Log.d(TAG, "Loading webview to solve cloudflare for ${request.url}") + if (!trySolveWithSavedCookies(url, host)) { + Log.d(TAG, "Loading webview to solve cloudflare for $url") WebViewResolver( // Never exit based on url Regex(".^"), // Cloudflare needs default user agent userAgent = null, - // Cannot use okhttp (i think intercepting cookies fails which causes the issues) + // Cannot use okhttp (intercepting cookies fails which causes the issues) useOkhttp = false, // Match every url for the requestCallBack additionalUrls = listOf(Regex(".")) - ).resolveUsingWebView( - url - ) { - trySolveWithSavedCookies(request) + ).resolveUsingWebView(url) { + trySolveWithSavedCookies(url, host) } } - val cookies = savedCookies[request.url.host] ?: return null - return proceed(request, cookies) + val cookies = savedCookies[host] ?: return null + return proceed(request, cookies, ctx) } } From 384e7dd23195a154c91350f7ec5cebbe5f22e5b4 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:48:07 -0600 Subject: [PATCH 047/116] Fix --- .../cloudstream3/services/PackageInstallerService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt b/app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt index fa7754718b5..742590e0ab2 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt @@ -81,7 +81,7 @@ class PackageInstallerService : Service() { ) val body = app.get(url).body - val inputStream = body.byteStream() + val inputStream = body.bytes().inputStream() installer = ApkInstaller(this) val totalSize = body.contentLength() var currentSize = 0 @@ -186,4 +186,4 @@ class PackageInstallerService : Service() { .putExtra(EXTRA_URL, url) } } -} \ No newline at end of file +} From 69db6edf6f497dbcf5f1d1afd0cc9372a086d15e Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:50:05 -0600 Subject: [PATCH 048/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3925728d30e..98b4693f5d3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "8de5b5b094" +nicehttp = "b1431dfe09" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From eeb664b629565bf55615360b3eedc51fe3565dca Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:53:25 -0600 Subject: [PATCH 049/116] Fix --- .../main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt index 8bcd1b88e70..22cb04c6781 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt @@ -196,7 +196,7 @@ object InAppUpdater { val sink: BufferedSink = downloadedFile.sink().buffer() updateLock.withLock { - sink.writeAll(app.get(url).body.source()) + sink.write(app.get(url).body.bytes()) sink.close() openApk(this, Uri.fromFile(downloadedFile)) } From 2f6498f777cc8c008fc4c92b1c71b4006a75bf06 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:55:50 -0600 Subject: [PATCH 050/116] Fix --- .../lagradost/cloudstream3/utils/downloader/DownloadManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt index 12fcc0c3329..9930842be93 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt @@ -820,7 +820,7 @@ object VideoDownloadManager { referer = referer, verify = false ) - val requestStream = request.body.byteStream() + val requestStream = response.body.bytes().inputStream() val buffer = ByteArray(bufferSize) var read: Int From 654a66ba19fc0edbad790e7f01e2aa9270d07925 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 20:58:45 -0600 Subject: [PATCH 051/116] Fix --- .../lagradost/cloudstream3/subtitles/AbstractSubProvider.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt index 9e6f241fb95..1ba26b2917b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt @@ -81,8 +81,8 @@ class SubtitleResource { url: String, nameGenerator: (String, File) -> String? = { _, _ -> null } ) { - val source = app.get(url).okhttpResponse.body.source() - val zip = downloadFile(source) + val bytes = app.get(url).body.bytes() + val zip = downloadFile(bytes.inputStream()) val realFiles = unzip(zip) zip.deleteRecursively() realFiles.forEach { (name, subtitleFile) -> From 19c05c05e06204ede4262d296c6f21ade9ed7935 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:03:05 -0600 Subject: [PATCH 052/116] Fix --- .../cloudstream3/syncproviders/providers/KitsuApi.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt index 074024e1b62..3273b6d7f8b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt @@ -22,6 +22,7 @@ import com.lagradost.cloudstream3.ui.SyncWatchType import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.txt +import com.lagradost.nicehttp.kmp.JsonAsString import com.lagradost.nicehttp.kmp.toNiceInterceptor import com.lagradost.nicehttp.kmp.parsed import okhttp3.Interceptor @@ -357,7 +358,7 @@ class KitsuApi: SyncAPI() { "content-type" to "application/vnd.api+json", "Authorization" to "Bearer ${auth.token.accessToken}" ), - requestBody = data.toJson().toRequestBody(), + json = JsonAsString(data.toJson()), interceptor = apiFallbackInterceptor ) @@ -391,7 +392,7 @@ class KitsuApi: SyncAPI() { "content-type" to "application/vnd.api+json", "Authorization" to "Bearer ${auth.token.accessToken}" ), - requestBody = data.toJson().toRequestBody(), + json = JsonAsString(data.toJson()), interceptor = apiFallbackInterceptor ) From fddcfb8ccec92f2e1936cd678469693e8789a2b6 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:05:38 -0600 Subject: [PATCH 053/116] Fix --- .../java/com/lagradost/cloudstream3/utils/SyncUtil.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt index 5e9ba34a527..59dbce26987 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt @@ -10,7 +10,7 @@ import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.nicehttp.kmp.parsed -import java.util.concurrent.TimeUnit +import kotlin.time.DurationUnit object SyncUtil { private val regexs = listOf( @@ -71,7 +71,7 @@ object SyncUtil { //Gogoanime, Twistmoe and 9anime val url = "https://raw.githubusercontent.com/MALSync/MAL-Sync-Backup/master/data/pages/$site/$slug.json" - val response = app.get(url, cacheTime = 1, cacheUnit = TimeUnit.DAYS).text + val response = app.get(url, cacheTime = 1, cacheUnit = DurationUnit.DAYS).text val mapped = parseJson(response) val overrideMal = mapped?.malId ?: mapped?.mal?.id ?: mapped?.anilist?.malId @@ -90,7 +90,7 @@ object SyncUtil { suspend fun getUrlsFromId(id: String, type: String = "anilist"): List { val url = "https://raw.githubusercontent.com/MALSync/MAL-Sync-Backup/master/data/$type/anime/$id.json" - val response = app.get(url, cacheTime = 1, cacheUnit = TimeUnit.DAYS).parsed() + val response = app.get(url, cacheTime = 1, cacheUnit = DurationUnit.DAYS).parsed() val pages = response.pages ?: return emptyList() val current = pages.gogoanime.values.union(pages.nineanime.values).union(pages.twistmoe.values) @@ -170,4 +170,4 @@ object SyncUtil { @JsonProperty("updatedAt") val updatedAt: String?, @JsonProperty("deletedAt") val deletedAt: String? ) -} \ No newline at end of file +} From ce0cf5d14d2d9e70c4d8260ae82486f2161ab17a Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:13:06 -0600 Subject: [PATCH 054/116] Fix --- .../lagradost/cloudstream3/subtitles/AbstractSubProvider.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt index 1ba26b2917b..c730a592928 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt @@ -4,6 +4,7 @@ import androidx.core.net.toUri import com.lagradost.cloudstream3.MainActivity.Companion.deleteFileOnExit import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.ui.player.SubtitleOrigin +import okio.Buffer import okio.BufferedSource import okio.buffer import okio.sink @@ -82,7 +83,7 @@ class SubtitleResource { nameGenerator: (String, File) -> String? = { _, _ -> null } ) { val bytes = app.get(url).body.bytes() - val zip = downloadFile(bytes.inputStream()) + val zip = downloadFile(okio.Buffer().write(bytes)) val realFiles = unzip(zip) zip.deleteRecursively() realFiles.forEach { (name, subtitleFile) -> From d5ce11a1ef8256344c77870c86bc6808ac6af5e5 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:14:25 -0600 Subject: [PATCH 055/116] - --- .../com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt index c730a592928..5d4fc9b694b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt @@ -83,7 +83,7 @@ class SubtitleResource { nameGenerator: (String, File) -> String? = { _, _ -> null } ) { val bytes = app.get(url).body.bytes() - val zip = downloadFile(okio.Buffer().write(bytes)) + val zip = downloadFile(Buffer().write(bytes)) val realFiles = unzip(zip) zip.deleteRecursively() realFiles.forEach { (name, subtitleFile) -> From 018e210cfbf9f03f8e7cdbe5b49571be56a7c097 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:16:18 -0600 Subject: [PATCH 056/116] Fix --- .../lagradost/cloudstream3/utils/downloader/DownloadManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt index 9930842be93..562cc91a3f9 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt @@ -820,7 +820,7 @@ object VideoDownloadManager { referer = referer, verify = false ) - val requestStream = response.body.bytes().inputStream() + val requestStream = request.body.bytes().inputStream() val buffer = ByteArray(bufferSize) var read: Int From 66888d1278ab3b5e07d5f3c1bd2090f270152d16 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:28:11 -0600 Subject: [PATCH 057/116] Update --- .../cloudstream3/ui/player/CS3IPlayer.kt | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt index aa44b92359b..07f8f9142be 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt @@ -732,18 +732,22 @@ class CS3IPlayer : IPlayer { private var simpleCache: SimpleCache? = null - /// Create a small factory for small things, no cache, no cronet + // Create a small factory for small things, no cache, no cronet private fun createOnlineSource( headers: Map?, - interceptor: Interceptor? + interceptor: com.lagradost.nicehttp.kmp.Interceptor? ): HttpDataSource.Factory { + val okHttpClient = (app.baseClient.engine as? io.ktor.client.engine.okhttp.OkHttpEngine) + ?.config?.preconfigured ?: okhttp3.OkHttpClient() + val client = if (interceptor == null) { - app.baseClient + okHttpClient } else { - app.baseClient.newBuilder() - .addInterceptor(interceptor) + okHttpClient.newBuilder() + .addInterceptor(interceptor.toOkHttpInterceptor()) .build() } + val source = OkHttpDataSource.Factory(client).setUserAgent(USER_AGENT) if (!headers.isNullOrEmpty()) { @@ -789,16 +793,20 @@ class CS3IPlayer : IPlayer { private fun createVideoSource( link: ExtractorLink, engine: CronetEngine?, - interceptor: Interceptor?, + interceptor: com.lagradost.nicehttp.kmp.Interceptor?, ): HttpDataSource.Factory { val userAgent = link.headers.entries.find { it.key.equals("User-Agent", ignoreCase = true) }?.value ?: USER_AGENT + val baseOkHttpClient = (app.baseClient.engine as io.ktor.client.engine.okhttp.OkHttpEngine) + .config + .preconfigured + val source = if (interceptor == null) { if (engine == null) { Log.d(TAG, "Using DefaultHttpDataSource for $link") - OkHttpDataSource.Factory(app.baseClient).setUserAgent(userAgent) + OkHttpDataSource.Factory(baseOkHttpClient).setUserAgent(userAgent) } else { Log.d(TAG, "Using CronetDataSource for $link") CronetDataSource.Factory(engine, Executors.newSingleThreadExecutor()) @@ -810,13 +818,13 @@ class CS3IPlayer : IPlayer { } } else { Log.d(TAG, "Using OkHttpDataSource for $link") - val client = app.baseClient.newBuilder() - .addInterceptor(interceptor) + val client = baseOkHttpClient.newBuilder() + .addInterceptor(interceptor.toOkHttpInterceptor()) .build() OkHttpDataSource.Factory(client).setUserAgent(userAgent) } - // Do no include empty referer, if the provider wants those they can use the header map. + // Do not include empty referer, if the provider wants those they can use the header map. val refererMap = if (link.referer.isBlank()) emptyMap() else mapOf("referer" to link.referer) From ad2c1ddae36a58f7d4262a64542acf6e9e8ee778 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:31:22 -0600 Subject: [PATCH 058/116] Fix --- .../com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt index 07f8f9142be..8efca646e0c 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt @@ -735,7 +735,7 @@ class CS3IPlayer : IPlayer { // Create a small factory for small things, no cache, no cronet private fun createOnlineSource( headers: Map?, - interceptor: com.lagradost.nicehttp.kmp.Interceptor? + interceptor: Interceptor? ): HttpDataSource.Factory { val okHttpClient = (app.baseClient.engine as? io.ktor.client.engine.okhttp.OkHttpEngine) ?.config?.preconfigured ?: okhttp3.OkHttpClient() @@ -744,7 +744,7 @@ class CS3IPlayer : IPlayer { okHttpClient } else { okHttpClient.newBuilder() - .addInterceptor(interceptor.toOkHttpInterceptor()) + .addInterceptor(interceptor) .build() } @@ -793,7 +793,7 @@ class CS3IPlayer : IPlayer { private fun createVideoSource( link: ExtractorLink, engine: CronetEngine?, - interceptor: com.lagradost.nicehttp.kmp.Interceptor?, + interceptor: Interceptor?, ): HttpDataSource.Factory { val userAgent = link.headers.entries.find { it.key.equals("User-Agent", ignoreCase = true) @@ -819,7 +819,7 @@ class CS3IPlayer : IPlayer { } else { Log.d(TAG, "Using OkHttpDataSource for $link") val client = baseOkHttpClient.newBuilder() - .addInterceptor(interceptor.toOkHttpInterceptor()) + .addInterceptor(toOkHttpInterceptor()) .build() OkHttpDataSource.Factory(client).setUserAgent(userAgent) } From 642d7b244b4916f97d6f4465270d7a7c93705e67 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:33:54 -0600 Subject: [PATCH 059/116] Fix --- .../java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt index 8efca646e0c..d53397f8e2f 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt @@ -819,7 +819,7 @@ class CS3IPlayer : IPlayer { } else { Log.d(TAG, "Using OkHttpDataSource for $link") val client = baseOkHttpClient.newBuilder() - .addInterceptor(toOkHttpInterceptor()) + .addInterceptor(interceptor) .build() OkHttpDataSource.Factory(client).setUserAgent(userAgent) } From 5e9be0207789daec200163a50f87ff4db0a96f88 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 May 2026 21:37:30 -0600 Subject: [PATCH 060/116] Fix --- .../java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt index d53397f8e2f..46a49588e98 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt @@ -801,7 +801,7 @@ class CS3IPlayer : IPlayer { val baseOkHttpClient = (app.baseClient.engine as io.ktor.client.engine.okhttp.OkHttpEngine) .config - .preconfigured + .preconfigured!! val source = if (interceptor == null) { if (engine == null) { From 7c6a72614649caa1c6d822f39b2f11a06c1c1887 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 10:40:57 -0600 Subject: [PATCH 061/116] Update --- .../com/lagradost/cloudstream3/plugins/RepositoryManager.kt | 1 - .../main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt | 1 - .../lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt | 1 - .../lagradost/cloudstream3/syncproviders/providers/MALApi.kt | 1 - .../cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt | 1 - .../lagradost/cloudstream3/syncproviders/providers/SimklApi.kt | 2 -- .../lagradost/cloudstream3/syncproviders/providers/SubSource.kt | 1 - .../com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt | 2 -- .../main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt | 1 - .../com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt | 1 - app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt | 1 - gradle/libs.versions.toml | 2 +- .../src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt | 1 - .../cloudstream3/extractors/HDPlayerSystemExtractor.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt | 1 - .../lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt | 1 - .../com/lagradost/cloudstream3/extractors/Rabbitstream.kt | 1 - .../lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt | 1 - .../com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt | 1 - .../com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt | 1 - .../kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt | 1 - .../com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt | 1 - .../com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt | 1 - .../com/lagradost/cloudstream3/metaproviders/MyDramaList.kt | 2 -- 32 files changed, 1 insertion(+), 35 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt index 8ece2d04274..6577affdf68 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt @@ -17,7 +17,6 @@ import com.lagradost.cloudstream3.plugins.PluginManager.unloadPlugin import com.lagradost.cloudstream3.ui.settings.extensions.REPOSITORIES_KEY import com.lagradost.cloudstream3.ui.settings.extensions.RepositoryData import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.nicehttp.kmp.parsedSafe import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import java.io.File diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt index e145e80013b..85a806f0b12 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt @@ -6,7 +6,6 @@ import com.lagradost.cloudstream3.CloudStreamApp.Companion.context import com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey import com.lagradost.cloudstream3.CloudStreamApp.Companion.setKey import com.lagradost.cloudstream3.R -import com.lagradost.nicehttp.kmp.parsedSafe import java.security.MessageDigest import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.utils.Coroutines.main diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt index 3273b6d7f8b..fa9189b6ef2 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt @@ -24,7 +24,6 @@ import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.txt import com.lagradost.nicehttp.kmp.JsonAsString import com.lagradost.nicehttp.kmp.toNiceInterceptor -import com.lagradost.nicehttp.kmp.parsed import okhttp3.Interceptor import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt index 852e0e3b6b3..ba0195be6b8 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt @@ -21,7 +21,6 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.DataStore.toKotlinObject import com.lagradost.cloudstream3.utils.txt -import com.lagradost.nicehttp.kmp.parsed import java.text.SimpleDateFormat import java.time.Instant import java.time.format.DateTimeFormatter diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt index 269633f7d4d..4b17fdb2920 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt @@ -18,7 +18,6 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToLangTagIETF import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToOpenSubtitlesTag -import com.lagradost.nicehttp.kmp.parsed class OpenSubtitlesApi : SubtitleAPI() { override val name = "OpenSubtitles" diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt index a20172471d4..c4095e2d881 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt @@ -32,8 +32,6 @@ import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.DataStoreHelper.toYear import com.lagradost.cloudstream3.utils.txt -import com.lagradost.nicehttp.kmp.parsed -import com.lagradost.nicehttp.kmp.parsedSafe import java.math.BigInteger import java.security.SecureRandom import java.text.SimpleDateFormat diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt index 63e9de15255..19122768e23 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt @@ -10,7 +10,6 @@ import com.lagradost.cloudstream3.syncproviders.SubtitleAPI import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.SubtitleHelper -import com.lagradost.nicehttp.kmp.parsedSafe class SubSourceApi : SubtitleAPI() { override val name = "SubSource" diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt index 7e5ae065044..1f1e6de4450 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt @@ -12,8 +12,6 @@ import com.lagradost.cloudstream3.syncproviders.AuthToken import com.lagradost.cloudstream3.syncproviders.AuthUser import com.lagradost.cloudstream3.syncproviders.SubtitleAPI import com.lagradost.cloudstream3.TvType -import com.lagradost.nicehttp.kmp.parsed -import com.lagradost.nicehttp.kmp.parsedSafe class SubDlApi : SubtitleAPI() { override val name = "SubDL" diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt index 6dc217d2191..2e554f75eaf 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt @@ -9,7 +9,6 @@ import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.newExtractorLink -import com.lagradost.nicehttp.kmp.parsed import torrServer.TorrServer import java.io.File import java.net.ConnectException diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt index 2064662c543..edb99e8b798 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt @@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.nicehttp.kmp.NiceResponse -import com.lagradost.nicehttp.kmp.parsed /** * API for fetching search suggestions from external sources. diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt index 59dbce26987..8131dbdc0cf 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt @@ -9,7 +9,6 @@ import com.lagradost.cloudstream3.APIHolder.apis import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import com.lagradost.nicehttp.kmp.parsed import kotlin.time.DurationUnit object SyncUtil { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 98b4693f5d3..e5b382ca96f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "b1431dfe09" +nicehttp = "12214f7dda" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt index fef850fa740..8d406032165 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt @@ -23,7 +23,6 @@ import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToLangTagIETF import com.lagradost.cloudstream3.utils.SubtitleHelper.fromLanguageToTagIETF import com.lagradost.nicehttp.kmp.JsonAsString import com.lagradost.nicehttp.kmp.RequestBodyTypes -import com.lagradost.nicehttp.kmp.parsedSafe import okhttp3.Interceptor import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt index 5839b575572..a86c5f01a83 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Acefile.kt @@ -3,7 +3,6 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.utils.* -import com.lagradost.nicehttp.kmp.parsedSafe open class Acefile : ExtractorApi() { override val name = "Acefile" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt index d6274063e7f..38d35da2eda 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/ByseSX.kt @@ -8,7 +8,6 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.nicehttp.kmp.parsedSafe import java.net.URI import java.nio.charset.StandardCharsets import javax.crypto.Cipher diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt index 3642a7819d2..ced827eecb7 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Gofile.kt @@ -8,7 +8,6 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.newExtractorLink -import com.lagradost.nicehttp.kmp.parsedSafe open class Gofile : ExtractorApi() { override val name = "Gofile" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/HDPlayerSystemExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/HDPlayerSystemExtractor.kt index fcadc89573c..9cff2049fac 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/HDPlayerSystemExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/HDPlayerSystemExtractor.kt @@ -5,7 +5,6 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.api.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* -import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class HDPlayerSystem : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt index 76f831e37de..fee9ebd6493 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Jeniusplay.kt @@ -10,7 +10,6 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.getAndUnpack import com.lagradost.cloudstream3.utils.getPacked -import com.lagradost.nicehttp.kmp.parsed open class Jeniusplay : ExtractorApi() { override val name = "Jeniusplay" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt index 6466fdb01a4..bfa94326aae 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Linkbox.kt @@ -7,7 +7,6 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.newExtractorLink -import com.lagradost.nicehttp.kmp.parsedSafe open class Linkbox : ExtractorApi() { override val name = "Linkbox" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt index 8eb95039258..f96387d75c1 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PeaceMakerstExtractor.kt @@ -5,7 +5,6 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.api.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* -import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class PeaceMakerst : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Rabbitstream.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Rabbitstream.kt index 798ba8ee259..98598dd2865 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Rabbitstream.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Rabbitstream.kt @@ -12,7 +12,6 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.nicehttp.kmp.parsedSafe import java.nio.charset.StandardCharsets import java.security.MessageDigest import javax.crypto.Cipher diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt index 398c4ec639b..be95940e0c1 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/SobreatsesuypExtractor.kt @@ -4,7 +4,6 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* -import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class Sobreatsesuyp : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt index 32134b02ce1..67cf1f8da9c 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamSB.kt @@ -7,7 +7,6 @@ import com.lagradost.cloudstream3.newSubtitleFile import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.nicehttp.kmp.parsedSafe import kotlin.random.Random class Sblona : StreamSB() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt index 7b3f07cb0f2..e3b51898601 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt @@ -10,7 +10,6 @@ import com.lagradost.cloudstream3.utils.newExtractorLink import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.nicehttp.kmp.JsonAsString import com.lagradost.nicehttp.kmp.RequestBodyTypes -import com.lagradost.nicehttp.kmp.parsed class Streamlare : Slmaxed() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt index 2f52f3dd858..ea85a005ea0 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamup.kt @@ -8,7 +8,6 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.newExtractorLink -import com.lagradost.nicehttp.kmp.parsed class Streamix(): Streamup() { override val name: String = "Streamix" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt index 3ed8ee1f029..1348f74d501 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TRsTXExtractor.kt @@ -5,7 +5,6 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.api.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* -import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class TRsTX : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt index 6088d69ae98..1c9cce2a834 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/TauVideoExtractor.kt @@ -5,7 +5,6 @@ package com.lagradost.cloudstream3.extractors import com.lagradost.api.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.* -import com.lagradost.nicehttp.kmp.parsedSafe import com.fasterxml.jackson.annotation.JsonProperty open class TauVideo : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt index 938b9e1501b..974549fcbbb 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vicloud.kt @@ -7,7 +7,6 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.newExtractorLink -import com.lagradost.nicehttp.kmp.parsedSafe open class Vicloud : ExtractorApi() { override val name: String = "Vicloud" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt index 9e8437541df..65fca1db1da 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vinovo.kt @@ -9,7 +9,6 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.newExtractorLink -import com.lagradost.nicehttp.kmp.parsed class VinovoSi : VinovoTo() { override var name = "VinovoSi" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt index 3ea9e897fd0..c7541842fe3 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/GogoHelper.kt @@ -14,7 +14,6 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.newExtractorLink -import com.lagradost.nicehttp.kmp.parsedSafe import java.net.URI import javax.crypto.Cipher import javax.crypto.spec.IvParameterSpec diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt index 4a02d218470..35aec2b1d46 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/helper/WcoHelper.kt @@ -2,7 +2,6 @@ package com.lagradost.cloudstream3.extractors.helper import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.app -import com.lagradost.nicehttp.kmp.parsedSafe class WcoHelper { companion object { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt index dc38b7c80bc..0001947c747 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt @@ -29,8 +29,6 @@ import com.lagradost.cloudstream3.newTvSeriesSearchResponse import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.nicehttp.kmp.HeadersInterceptor -import com.lagradost.nicehttp.kmp.parsed -import com.lagradost.nicehttp.kmp.parsedSafe import java.text.SimpleDateFormat import java.util.Locale From 323d2120c9d64ed8deb149682656e56afad5267e Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 10:43:40 -0600 Subject: [PATCH 062/116] - --- .../java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt | 1 - .../java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt | 1 - .../com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt | 1 - .../com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt | 1 - 4 files changed, 4 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt index b799e0f1532..0db90afeaef 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AniSkip.kt @@ -7,7 +7,6 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.getMalId import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.ui.result.ResultEpisode -import com.lagradost.nicehttp.kmp.parsed // taken from https://github.com/saikou-app/saikou/blob/3803f8a7a59b826ca193664d46af3a22bbc989f7/app/src/main/java/ani/saikou/others/AniSkip.kt // the following is GPLv3 code https://github.com/saikou-app/saikou/blob/main/LICENSE.md diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt index 5d5a87a1277..f9254576bb5 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/AnimeSkip.kt @@ -17,7 +17,6 @@ import com.lagradost.cloudstream3.syncproviders.PlainAuthRepo import com.lagradost.cloudstream3.ui.result.ResultEpisode import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.nicehttp.kmp.parsed import java.math.BigInteger import java.util.concurrent.ConcurrentHashMap import java.security.MessageDigest diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt index a940b3d2769..869515f4390 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/IntroDbSkip.kt @@ -6,7 +6,6 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.getImdbId import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.ui.result.ResultEpisode -import com.lagradost.nicehttp.kmp.parsed class IntroDbSkip : SkipAPI() { override val name = "IntroDb" diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt index 1e9515c4543..cc2661cb096 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/videoskip/TheIntroDBSkip.kt @@ -8,7 +8,6 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.isMovie import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.ui.result.ResultEpisode import com.lagradost.cloudstream3.app -import com.lagradost.nicehttp.kmp.parsed /** https://theintrodb.org/docs */ class TheIntroDBSkip : SkipAPI() { From 8bb2d3d370509801401ee4790720f197680997e3 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 11:38:22 -0600 Subject: [PATCH 063/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e5b382ca96f..adbcaee1046 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "12214f7dda" +nicehttp = "5a1c2f0f3f" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 66558968801945c590cd7673ad85f8b2a3e63fb6 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 11:53:34 -0600 Subject: [PATCH 064/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index adbcaee1046..ae7270a77d2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "5a1c2f0f3f" +nicehttp = "47a180ed7b" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From ed910cf420507d207d6ecb362c7adea69f88260d Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 12:08:52 -0600 Subject: [PATCH 065/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ae7270a77d2..81ace7c1dea 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "47a180ed7b" +nicehttp = "e36de3292a" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From f4e74c62648844c2feaf8f6461dd29c55378916f Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 12:15:32 -0600 Subject: [PATCH 066/116] - --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 675ce3b2f77..bf499d2a77e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -27,7 +27,7 @@ jobs: cache-read-only: false - name: Run Gradle - run: ./gradlew assemblePrereleaseDebug lint + run: ./gradlew assemblePrereleaseDebug - name: Upload Artifact uses: actions/upload-artifact@v7 From 8cf13922f1d9d980a34bc691d5685a216add0962 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 12:21:43 -0600 Subject: [PATCH 067/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 81ace7c1dea..bf572ea73d5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "e36de3292a" +nicehttp = "b0c5a6e0bb" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 1cb674ba7e1ebdc46017cd6df416d13aa1209301 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 15:25:02 -0600 Subject: [PATCH 068/116] Try --- .../lagradost/cloudstream3/plugins/RepositoryManager.kt | 9 ++++++--- .../cloudstream3/services/PackageInstallerService.kt | 4 ++-- .../cloudstream3/subtitles/AbstractSubProvider.kt | 5 ++--- .../cloudstream3/syncproviders/providers/Addic7ed.kt | 2 +- .../com/lagradost/cloudstream3/utils/InAppUpdater.kt | 2 +- .../cloudstream3/utils/downloader/DownloadManager.kt | 2 +- gradle/libs.versions.toml | 2 +- .../cloudstream3/network/WebViewResolver.android.kt | 8 ++++---- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt index 6577affdf68..07d6aaa37bc 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt @@ -177,9 +177,12 @@ object RepositoryManager { // Prevent corrupting the plugin file if the operation fails val tempFile = File.createTempFile(file.name, ".tmp", context.cacheDir) - val bodyBytes = app.get(convertRawGitUrl(pluginUrl)).body.bytes() - tempFile.outputStream().use { fileStream -> - fileStream.write(bodyBytes) + val body = app.get(convertRawGitUrl(pluginUrl)).okhttpResponse.body + + body.byteStream().use { body -> + tempFile.outputStream().use { fileSteam -> + body.copyTo(fileSteam) + } } if (expectedFileHash != null) { diff --git a/app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt b/app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt index 742590e0ab2..fa7754718b5 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt @@ -81,7 +81,7 @@ class PackageInstallerService : Service() { ) val body = app.get(url).body - val inputStream = body.bytes().inputStream() + val inputStream = body.byteStream() installer = ApkInstaller(this) val totalSize = body.contentLength() var currentSize = 0 @@ -186,4 +186,4 @@ class PackageInstallerService : Service() { .putExtra(EXTRA_URL, url) } } -} +} \ No newline at end of file diff --git a/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt index 5d4fc9b694b..9e6f241fb95 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt @@ -4,7 +4,6 @@ import androidx.core.net.toUri import com.lagradost.cloudstream3.MainActivity.Companion.deleteFileOnExit import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.ui.player.SubtitleOrigin -import okio.Buffer import okio.BufferedSource import okio.buffer import okio.sink @@ -82,8 +81,8 @@ class SubtitleResource { url: String, nameGenerator: (String, File) -> String? = { _, _ -> null } ) { - val bytes = app.get(url).body.bytes() - val zip = downloadFile(Buffer().write(bytes)) + val source = app.get(url).okhttpResponse.body.source() + val zip = downloadFile(source) val realFiles = unzip(zip) zip.deleteRecursively() realFiles.forEach { (name, subtitleFile) -> diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt index 9d7a1fcea06..b83a32e45dc 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt @@ -203,4 +203,4 @@ class Addic7ed : SubtitleAPI() { "zh-hans" to Pair("41", "Chinese (Simplified)"), "zh-hant" to Pair("24", "Chinese (Traditional)"), ) -} +} \ No newline at end of file diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt index 22cb04c6781..8bcd1b88e70 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt @@ -196,7 +196,7 @@ object InAppUpdater { val sink: BufferedSink = downloadedFile.sink().buffer() updateLock.withLock { - sink.write(app.get(url).body.bytes()) + sink.writeAll(app.get(url).body.source()) sink.close() openApk(this, Uri.fromFile(downloadedFile)) } diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt index 562cc91a3f9..12fcc0c3329 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/downloader/DownloadManager.kt @@ -820,7 +820,7 @@ object VideoDownloadManager { referer = referer, verify = false ) - val requestStream = request.body.bytes().inputStream() + val requestStream = request.body.byteStream() val buffer = ByteArray(bufferSize) var read: Int diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bf572ea73d5..b4b7b678776 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "b0c5a6e0bb" +nicehttp = "b57dfbcf4c" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index 98ce49b8f15..668fa296488 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -228,12 +228,12 @@ actual class WebViewResolver actual constructor( useOkhttp && request.method == "GET" -> app.get( webViewUrl, headers = request.requestHeaders - ).toWebResourceResponse() + ).okhttpResponse.toWebResourceResponse() useOkhttp && request.method == "POST" -> app.post( webViewUrl, headers = request.requestHeaders - ).toWebResourceResponse() + ).okhttpResponse.toWebResourceResponse() else -> super.shouldInterceptRequest( view, @@ -302,8 +302,8 @@ fun NiceResponse.toWebResourceResponse(): WebResourceResponse { val found = typeRegex.find(contentTypeValue) val contentType = found?.groupValues?.getOrNull(1)?.ifBlank { null } ?: contentTypeValue val charset = found?.groupValues?.getOrNull(2)?.ifBlank { null } - WebResourceResponse(contentType, charset, body.bytes().inputStream()) + WebResourceResponse(contentType, charset, this.body.byteStream()) } else { - WebResourceResponse("application/octet-stream", null, body.bytes().inputStream()) + WebResourceResponse("application/octet-stream", null, this.body.byteStream()) } } From 7b48b56179ee982b0141c1cf9682969bf7bc9ecd Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 16:46:40 -0600 Subject: [PATCH 069/116] Update --- gradle/libs.versions.toml | 2 +- .../lagradost/cloudstream3/network/WebViewResolver.android.kt | 2 +- .../com/lagradost/cloudstream3/extractors/GenericM3U8.kt | 2 +- .../com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt | 4 ++-- .../kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b4b7b678776..fe564d3318e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "b57dfbcf4c" +nicehttp = "70d60dd9a4" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index 668fa296488..d26cfcf6ee9 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -295,7 +295,7 @@ fun WebResourceRequest.toRequest(): Request? { } fun NiceResponse.toWebResourceResponse(): WebResourceResponse { - val contentTypeValue = headers["Content-Type"] + val contentTypeValue = this.header("Content-Type") // 1. contentType. 2. charset val typeRegex = Regex("""(.*);(?:.*charset=(.*)(?:|;)|)""") return if (contentTypeValue != null) { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt index 885f05834ca..0a0c0f4d5af 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt @@ -25,7 +25,7 @@ open class GenericM3U8 : ExtractorApi() { name, response.url, url, - headers = response.headersMap + headers = response.headers.toMap() ).forEach { link -> sources.add(link) } diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt index e491297b616..950dbfef6c9 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/PlayerVoxzer.kt @@ -22,10 +22,10 @@ open class PlayerVoxzer : ExtractorApi() { name, listm3, url, - headers = app.get(url).headersMap + headers = app.get(url).headers.toMap() ).forEach { link -> sources.add(link) } return sources } -} +} \ No newline at end of file diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt index 53bfbd47f27..e58dc86176e 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt @@ -19,6 +19,6 @@ open class WatchSB : ExtractorApi() { ).toNiceInterceptor() ) - return generateM3u8(name, response.url, url, headers = response.headersMap) + return generateM3u8(name, response.url, url, headers = response.headers.toMap) } } \ No newline at end of file From 1d1cf1452050361ca23d1c47381d8b57b27166e9 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 16:56:20 -0600 Subject: [PATCH 070/116] Fix --- .../kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt index e58dc86176e..0bb6b375b4b 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt @@ -19,6 +19,6 @@ open class WatchSB : ExtractorApi() { ).toNiceInterceptor() ) - return generateM3u8(name, response.url, url, headers = response.headers.toMap) + return generateM3u8(name, response.url, url, headers = response.headers.toMap()) } } \ No newline at end of file From 8fa030bc963cae1f819db9a976c276a9a69f1af6 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 17:47:21 -0600 Subject: [PATCH 071/116] Test --- gradle/libs.versions.toml | 2 +- .../kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fe564d3318e..8eb37d78e5b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "70d60dd9a4" +nicehttp = "767cb20323" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt index da5787178c9..a93db20016c 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt @@ -102,7 +102,7 @@ open class FilemoonV2 : ExtractorApi() { val interceptedUrl = app.get( iframeSrcUrl, referer = referer, - interceptor = resolver.toNiceInterceptor() + interceptor = resolver ).url if (interceptedUrl.isNotEmpty()) { From c6a13a0ed02ee9481e79c0f58f7b71f18fdbf926 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 18:07:51 -0600 Subject: [PATCH 072/116] Try --- .../lagradost/cloudstream3/network/CloudflareKiller.kt | 8 ++++---- .../com/lagradost/cloudstream3/network/DdosGuardKiller.kt | 8 ++++---- .../com/lagradost/cloudstream3/network/RequestsHelper.kt | 4 ++-- .../cloudstream3/syncproviders/providers/KitsuApi.kt | 4 ++-- .../cloudstream3/ui/search/SearchSuggestionApi.kt | 2 +- gradle/libs.versions.toml | 2 +- .../cloudstream3/network/WebViewResolver.android.kt | 4 ++-- .../kotlin/com/lagradost/cloudstream3/MainAPI.kt | 4 ++-- .../kotlin/com/lagradost/cloudstream3/MainActivity.kt | 6 +++--- .../com/lagradost/cloudstream3/extractors/Filemoon.kt | 4 ++-- .../com/lagradost/cloudstream3/extractors/Filesim.kt | 2 +- .../com/lagradost/cloudstream3/extractors/GenericM3U8.kt | 2 +- .../cloudstream3/extractors/StreamWishExtractor.kt | 2 +- .../com/lagradost/cloudstream3/extractors/Streamlare.kt | 4 ++-- .../com/lagradost/cloudstream3/extractors/WatchSB.kt | 2 +- .../lagradost/cloudstream3/metaproviders/MyDramaList.kt | 2 +- .../com/lagradost/cloudstream3/utils/UnshortenUrl.kt | 2 +- .../lagradost/cloudstream3/network/WebViewResolver.jvm.kt | 2 +- 18 files changed, 32 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index a41bfcd317c..1d2e7278c35 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -6,10 +6,10 @@ import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe -import com.lagradost.nicehttp.kmp.HttpSendInterceptorContext -import com.lagradost.nicehttp.kmp.Interceptor -import com.lagradost.nicehttp.kmp.buildHeaders -import com.lagradost.nicehttp.kmp.getRequestCookies +import com.lagradost.nicehttp.HttpSendInterceptorContext +import com.lagradost.nicehttp.Interceptor +import com.lagradost.nicehttp.buildHeaders +import com.lagradost.nicehttp.getRequestCookies import io.ktor.client.call.* import io.ktor.client.request.* import io.ktor.http.* diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt index 6ed15e38e52..7b36be730b0 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt @@ -2,10 +2,10 @@ package com.lagradost.cloudstream3.network import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app -import com.lagradost.nicehttp.kmp.HttpSendInterceptorContext -import com.lagradost.nicehttp.kmp.Interceptor -import com.lagradost.nicehttp.kmp.Requests -import com.lagradost.nicehttp.kmp.getRequestCookies +import com.lagradost.nicehttp.HttpSendInterceptorContext +import com.lagradost.nicehttp.Interceptor +import com.lagradost.nicehttp.Requests +import com.lagradost.nicehttp.getRequestCookies import io.ktor.client.call.* import io.ktor.client.request.* import io.ktor.http.* diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt index 5271c9eaa2f..4badc5ed87c 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt @@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.Prerelease import com.lagradost.cloudstream3.R import com.lagradost.cloudstream3.USER_AGENT import com.lagradost.cloudstream3.mvvm.safe -import com.lagradost.nicehttp.kmp.Requests -import com.lagradost.nicehttp.kmp.ignoreAllSSLErrors +import com.lagradost.nicehttp.Requests +import com.lagradost.nicehttp.ignoreAllSSLErrors import io.ktor.client.* import io.ktor.client.engine.okhttp.* import io.ktor.client.plugins.* diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt index fa9189b6ef2..74b15d7568a 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt @@ -22,8 +22,8 @@ import com.lagradost.cloudstream3.ui.SyncWatchType import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.txt -import com.lagradost.nicehttp.kmp.JsonAsString -import com.lagradost.nicehttp.kmp.toNiceInterceptor +import com.lagradost.nicehttp.JsonAsString +import com.lagradost.nicehttp.toNiceInterceptor import okhttp3.Interceptor import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt index edb99e8b798..382b7918406 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt @@ -3,7 +3,7 @@ package com.lagradost.cloudstream3.ui.search import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError -import com.lagradost.nicehttp.kmp.NiceResponse +import com.lagradost.nicehttp.NiceResponse /** * API for fetching search suggestions from external sources. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8eb37d78e5b..d6817b6ce38 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "767cb20323" +nicehttp = "98cc03fea9" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" diff --git a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt index d26cfcf6ee9..6fbb20da0a2 100644 --- a/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt +++ b/library/src/androidMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.android.kt @@ -14,8 +14,8 @@ import com.lagradost.cloudstream3.utils.Coroutines.main import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.runOnMainThread import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf -import com.lagradost.nicehttp.kmp.NiceResponse -import com.lagradost.nicehttp.kmp.requestCreator +import com.lagradost.nicehttp.NiceResponse +import com.lagradost.nicehttp.requestCreator import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking import okhttp3.Interceptor diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt index 8d406032165..71650a71111 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt @@ -21,8 +21,8 @@ import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToLangTagIETF import com.lagradost.cloudstream3.utils.SubtitleHelper.fromLanguageToTagIETF -import com.lagradost.nicehttp.kmp.JsonAsString -import com.lagradost.nicehttp.kmp.RequestBodyTypes +import com.lagradost.nicehttp.JsonAsString +import com.lagradost.nicehttp.RequestBodyTypes import okhttp3.Interceptor import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt index 8b9102ea596..3419ffb7d9c 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt @@ -5,9 +5,9 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fleeksoft.ksoup.Ksoup import com.fleeksoft.ksoup.nodes.Document -import com.lagradost.nicehttp.kmp.NiceResponse -import com.lagradost.nicehttp.kmp.Requests -import com.lagradost.nicehttp.kmp.ResponseParser +import com.lagradost.nicehttp.NiceResponse +import com.lagradost.nicehttp.Requests +import com.lagradost.nicehttp.ResponseParser import kotlin.reflect.KClass // Short name for requests client to make it nicer to use diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt index a93db20016c..aae27d6ecc6 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt @@ -10,7 +10,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.JsUnpacker import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.nicehttp.kmp.toNiceInterceptor +import com.lagradost.nicehttp.toNiceInterceptor class FileMoon : FilemoonV2() { @@ -102,7 +102,7 @@ open class FilemoonV2 : ExtractorApi() { val interceptedUrl = app.get( iframeSrcUrl, referer = referer, - interceptor = resolver + interceptor = resolver.toNiceInterceptor() ).url if (interceptedUrl.isNotEmpty()) { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt index dee4b5e6930..a714d5e200a 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt @@ -7,7 +7,7 @@ import com.lagradost.cloudstream3.utils.* import com.lagradost.api.Log import com.lagradost.cloudstream3.extractors.helper.JwPlayerHelper import com.lagradost.cloudstream3.network.WebViewResolver -import com.lagradost.nicehttp.kmp.toNiceInterceptor +import com.lagradost.nicehttp.toNiceInterceptor class Multimoviesshg : Filesim() { override var mainUrl = "https://multimoviesshg.com" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt index 0a0c0f4d5af..befd444bd36 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt @@ -5,7 +5,7 @@ import com.lagradost.cloudstream3.network.WebViewResolver import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.nicehttp.kmp.toNiceInterceptor +import com.lagradost.nicehttp.toNiceInterceptor open class GenericM3U8 : ExtractorApi() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt index 941491fb63c..467e3c96dbe 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt @@ -12,7 +12,7 @@ import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.getAndUnpack import com.lagradost.cloudstream3.utils.getPacked import com.lagradost.cloudstream3.network.WebViewResolver -import com.lagradost.nicehttp.kmp.toNiceInterceptor +import com.lagradost.nicehttp.toNiceInterceptor class Mwish : StreamWishExtractor() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt index e3b51898601..0c6904cfbdf 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt @@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.INFER_TYPE import com.lagradost.cloudstream3.utils.newExtractorLink import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.nicehttp.kmp.JsonAsString -import com.lagradost.nicehttp.kmp.RequestBodyTypes +import com.lagradost.nicehttp.JsonAsString +import com.lagradost.nicehttp.RequestBodyTypes class Streamlare : Slmaxed() { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt index 0bb6b375b4b..53ed366d4bd 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt @@ -5,7 +5,7 @@ import com.lagradost.cloudstream3.network.WebViewResolver import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper.Companion.generateM3u8 -import com.lagradost.nicehttp.kmp.toNiceInterceptor +import com.lagradost.nicehttp.toNiceInterceptor open class WatchSB : ExtractorApi() { override var name = "WatchSB" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt index 0001947c747..eaf5454717e 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt @@ -28,7 +28,7 @@ import com.lagradost.cloudstream3.newTvSeriesLoadResponse import com.lagradost.cloudstream3.newTvSeriesSearchResponse import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.nicehttp.kmp.HeadersInterceptor +import com.lagradost.nicehttp.HeadersInterceptor import java.text.SimpleDateFormat import java.util.Locale diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt index 3aa7eb25282..6741eb692f2 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/UnshortenUrl.kt @@ -3,7 +3,7 @@ package com.lagradost.cloudstream3.utils import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode import com.lagradost.cloudstream3.ksoupDocument -import com.lagradost.nicehttp.kmp.NiceResponse +import com.lagradost.nicehttp.NiceResponse import java.net.URI import java.net.URLDecoder diff --git a/library/src/jvmMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.jvm.kt b/library/src/jvmMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.jvm.kt index 6f4c2592cde..39e0d51f95e 100644 --- a/library/src/jvmMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.jvm.kt +++ b/library/src/jvmMain/kotlin/com/lagradost/cloudstream3/network/WebViewResolver.jvm.kt @@ -2,7 +2,7 @@ package com.lagradost.cloudstream3.network import com.lagradost.cloudstream3.mvvm.debugException import com.lagradost.cloudstream3.mvvm.logError -import com.lagradost.nicehttp.kmp.requestCreator +import com.lagradost.nicehttp.requestCreator import okhttp3.Interceptor import okhttp3.Request import okhttp3.Response From 4cc3664c07fb7dc0157dc174aab99ea45dc2d962 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 10 May 2026 18:12:33 -0600 Subject: [PATCH 073/116] - --- .../kotlin/com/lagradost/cloudstream3/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt index 3419ffb7d9c..a74097fd5f4 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt @@ -50,4 +50,4 @@ val NiceResponse.ksoupDocument: Document @UnsafeSSL var insecureApp = Requests(responseParser = jacksonResponseParser).apply { defaultHeaders = mapOf("user-agent" to USER_AGENT) -} +} \ No newline at end of file From 2d15595225c451adbbea1dab3daf114acd6ce0a4 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Mon, 11 May 2026 12:24:52 -0600 Subject: [PATCH 074/116] Try update --- .../syncproviders/providers/KitsuApi.kt | 5 ++- gradle/libs.versions.toml | 2 +- .../cloudstream3/extractors/Filemoon.kt | 3 +- .../cloudstream3/extractors/Filesim.kt | 3 +- .../cloudstream3/extractors/GenericM3U8.kt | 3 +- .../extractors/StreamWishExtractor.kt | 3 +- .../cloudstream3/extractors/WatchSB.kt | 3 +- .../cloudstream3/metaproviders/MyDramaList.kt | 35 ++++++++----------- 8 files changed, 22 insertions(+), 35 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt index 74b15d7568a..052fd3386d5 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt @@ -23,7 +23,6 @@ import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.txt import com.lagradost.nicehttp.JsonAsString -import com.lagradost.nicehttp.toNiceInterceptor import okhttp3.Interceptor import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody @@ -89,8 +88,8 @@ class KitsuApi: SyncAPI() { } } - private val apiFallbackInterceptor = FallbackInterceptor(apiUrl, fallbackApiUrl).toNiceInterceptor() - private val oauthFallbackInterceptor = FallbackInterceptor(oauthUrl, fallbackOauthUrl).toNiceInterceptor() + private val apiFallbackInterceptor = FallbackInterceptor(apiUrl, fallbackApiUrl) + private val oauthFallbackInterceptor = FallbackInterceptor(oauthUrl, fallbackOauthUrl) override suspend fun login(form: AuthLoginResponse): AuthToken? { val username = form.email ?: return null diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d6817b6ce38..daeb73432a4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "98cc03fea9" +nicehttp = "234bce1909" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt index aae27d6ecc6..df5e7f794e4 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filemoon.kt @@ -10,7 +10,6 @@ import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.JsUnpacker import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.nicehttp.toNiceInterceptor class FileMoon : FilemoonV2() { @@ -102,7 +101,7 @@ open class FilemoonV2 : ExtractorApi() { val interceptedUrl = app.get( iframeSrcUrl, referer = referer, - interceptor = resolver.toNiceInterceptor() + interceptor = resolver ).url if (interceptedUrl.isNotEmpty()) { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt index a714d5e200a..a3e4f619a2a 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Filesim.kt @@ -7,7 +7,6 @@ import com.lagradost.cloudstream3.utils.* import com.lagradost.api.Log import com.lagradost.cloudstream3.extractors.helper.JwPlayerHelper import com.lagradost.cloudstream3.network.WebViewResolver -import com.lagradost.nicehttp.toNiceInterceptor class Multimoviesshg : Filesim() { override var mainUrl = "https://multimoviesshg.com" @@ -95,7 +94,7 @@ open class Filesim : ExtractorApi() { val interceptedUrl = app.get( url = pageResponse.url, referer = referer, - interceptor = resolver.toNiceInterceptor() + interceptor = resolver ).url if (interceptedUrl.isNotEmpty()) { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt index befd444bd36..65cf1be4f5b 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GenericM3U8.kt @@ -5,7 +5,6 @@ import com.lagradost.cloudstream3.network.WebViewResolver import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.nicehttp.toNiceInterceptor open class GenericM3U8 : ExtractorApi() { @@ -17,7 +16,7 @@ open class GenericM3U8 : ExtractorApi() { val response = app.get( url, interceptor = WebViewResolver( Regex("""master\.m3u8""") - ).toNiceInterceptor() + ) ) val sources = mutableListOf() if (response.url.contains("m3u8")) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt index 467e3c96dbe..54e21fcb6f8 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/StreamWishExtractor.kt @@ -12,7 +12,6 @@ import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.getAndUnpack import com.lagradost.cloudstream3.utils.getPacked import com.lagradost.cloudstream3.network.WebViewResolver -import com.lagradost.nicehttp.toNiceInterceptor class Mwish : StreamWishExtractor() { @@ -195,7 +194,7 @@ open class StreamWishExtractor : ExtractorApi() { val interceptedStreamUrl = app.get( url, referer = referer, - interceptor = webViewM3u8Resolver.toNiceInterceptor() + interceptor = webViewM3u8Resolver ).url if (interceptedStreamUrl.isNotEmpty()) { diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt index 53ed366d4bd..20f0a2b5e4d 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/WatchSB.kt @@ -5,7 +5,6 @@ import com.lagradost.cloudstream3.network.WebViewResolver import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper.Companion.generateM3u8 -import com.lagradost.nicehttp.toNiceInterceptor open class WatchSB : ExtractorApi() { override var name = "WatchSB" @@ -16,7 +15,7 @@ open class WatchSB : ExtractorApi() { val response = app.get( url, interceptor = WebViewResolver( Regex("""master\.m3u8""") - ).toNiceInterceptor() + ) ) return generateM3u8(name, response.url, url, headers = response.headers.toMap()) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt index eaf5454717e..efbc6c23e5c 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt @@ -66,21 +66,19 @@ abstract class MyDramaListAPI : MainAPI() { ) override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val list = app.get( - url = "${request.data}&limit=20&page=$page&lang=en-US", + val list = app.get("${request.data}&limit=20&page=$page&lang=en-US") { interceptor = headerInterceptor - ).parsed().map { element -> + }.parsed().map { element -> element.toSearchResponse() } return newHomePageResponse(request.name, list) } override suspend fun search(query: String): List? { - return app.post( - url = "$API_HOST/search/titles", + return app.post("$API_HOST/search/titles") { data = mapOf("q" to query), interceptor = headerInterceptor - ).parsed().map { element -> + }.parsed().map { element -> element.toSearchResponse() } } @@ -117,10 +115,9 @@ abstract class MyDramaListAPI : MainAPI() { override suspend fun load(url: String): LoadResponse { val data = parseJson(url) - return app.get( - url = "$API_HOST/titles/${data.media?.id}", + return app.get("$API_HOST/titles/${data.media?.id}") { interceptor = headerInterceptor - ).parsed().toLoadResponse(data) + }.parsed().toLoadResponse(data) } private suspend fun Media.toLoadResponse(data: Data): LoadResponse { @@ -278,10 +275,9 @@ abstract class MyDramaListAPI : MainAPI() { @JsonProperty("updated_at") val updatedAt: Long, ) { suspend fun fetchCredits(): List { - val actors = app.get( - url = "$API_HOST/titles/$id/credits", + val actors = app.get("$API_HOST/titles/$id/credits") { interceptor = headerInterceptor - ).parsed().cast.map { + }.parsed().cast.map { ActorData( Actor( name = it.name, @@ -294,17 +290,15 @@ abstract class MyDramaListAPI : MainAPI() { } suspend fun fetchRecommendations(): Recommendations { - return app.get( - url = "$API_HOST/titles/$id/recommendations", + return app.get("$API_HOST/titles/$id/recommendations") { interceptor = headerInterceptor - ).parsed() + }.parsed() } suspend fun fetchTrailer(): String? { - return app.get( - url = "$SITE_HOST/v1/trailers/${trailer?.id}", + return app.get("$SITE_HOST/v1/trailers/${trailer?.id}") { interceptor = headerInterceptor - ).parsedSafe()?.trailer?.trailerDetails?.source + }.parsedSafe()?.trailer?.trailerDetails?.source } fun fixGenres(): List { @@ -319,10 +313,9 @@ abstract class MyDramaListAPI : MainAPI() { } private suspend fun Media.fetchEpisodes(): List { - return app.get( - url = "$API_HOST/titles/${this.id}/episodes", + return app.get("$API_HOST/titles/${this.id}/episodes") { interceptor = headerInterceptor - ).parsed().map { + }.parsed().map { it.episodes }.flatten().map { ep -> val link = LinkData( From f73b1cf9b4e67944ee3ec94c59fef73bf06afa5c Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Mon, 11 May 2026 12:32:32 -0600 Subject: [PATCH 075/116] Fix --- .../java/com/lagradost/cloudstream3/utils/SyncUtil.kt | 8 ++++---- .../lagradost/cloudstream3/metaproviders/MyDramaList.kt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt index 8131dbdc0cf..351e77c8d72 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/SyncUtil.kt @@ -9,7 +9,7 @@ import com.lagradost.cloudstream3.APIHolder.apis import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import kotlin.time.DurationUnit +import java.util.concurrent.TimeUnit object SyncUtil { private val regexs = listOf( @@ -70,7 +70,7 @@ object SyncUtil { //Gogoanime, Twistmoe and 9anime val url = "https://raw.githubusercontent.com/MALSync/MAL-Sync-Backup/master/data/pages/$site/$slug.json" - val response = app.get(url, cacheTime = 1, cacheUnit = DurationUnit.DAYS).text + val response = app.get(url, cacheTime = 1, cacheUnit = TimeUnit.DAYS).text val mapped = parseJson(response) val overrideMal = mapped?.malId ?: mapped?.mal?.id ?: mapped?.anilist?.malId @@ -89,7 +89,7 @@ object SyncUtil { suspend fun getUrlsFromId(id: String, type: String = "anilist"): List { val url = "https://raw.githubusercontent.com/MALSync/MAL-Sync-Backup/master/data/$type/anime/$id.json" - val response = app.get(url, cacheTime = 1, cacheUnit = DurationUnit.DAYS).parsed() + val response = app.get(url, cacheTime = 1, cacheUnit = TimeUnit.DAYS).parsed() val pages = response.pages ?: return emptyList() val current = pages.gogoanime.values.union(pages.nineanime.values).union(pages.twistmoe.values) @@ -169,4 +169,4 @@ object SyncUtil { @JsonProperty("updatedAt") val updatedAt: String?, @JsonProperty("deletedAt") val deletedAt: String? ) -} +} \ No newline at end of file diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt index efbc6c23e5c..e2752175e75 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt @@ -76,7 +76,7 @@ abstract class MyDramaListAPI : MainAPI() { override suspend fun search(query: String): List? { return app.post("$API_HOST/search/titles") { - data = mapOf("q" to query), + data = mapOf("q" to query) interceptor = headerInterceptor }.parsed().map { element -> element.toSearchResponse() From 5313215341a82daa3d6112c2609f8779edcebe70 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Mon, 11 May 2026 13:38:17 -0600 Subject: [PATCH 076/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index daeb73432a4..db06c136982 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "234bce1909" +nicehttp = "4f6b5a2b98" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 5c8469d87e753713c3f16152195e42f99d02b217 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Mon, 11 May 2026 14:29:36 -0600 Subject: [PATCH 077/116] Update --- .../cloudstream3/syncproviders/providers/KitsuApi.kt | 5 ++--- gradle/libs.versions.toml | 2 +- .../commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt | 5 ++--- .../com/lagradost/cloudstream3/extractors/Streamlare.kt | 5 +++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt index 052fd3386d5..29c3c0c1793 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt @@ -22,7 +22,6 @@ import com.lagradost.cloudstream3.ui.SyncWatchType import com.lagradost.cloudstream3.ui.library.ListSorting import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.txt -import com.lagradost.nicehttp.JsonAsString import okhttp3.Interceptor import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody @@ -356,7 +355,7 @@ class KitsuApi: SyncAPI() { "content-type" to "application/vnd.api+json", "Authorization" to "Bearer ${auth.token.accessToken}" ), - json = JsonAsString(data.toJson()), + requestBody = data.toJson().toRequestBody(), interceptor = apiFallbackInterceptor ) @@ -390,7 +389,7 @@ class KitsuApi: SyncAPI() { "content-type" to "application/vnd.api+json", "Authorization" to "Bearer ${auth.token.accessToken}" ), - json = JsonAsString(data.toJson()), + requestBody = data.toJson().toRequestBody(), interceptor = apiFallbackInterceptor ) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index db06c136982..d2683473c41 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "4f6b5a2b98" +nicehttp = "a737f92e53" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt index 71650a71111..33933c6b3f8 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt @@ -21,7 +21,6 @@ import com.lagradost.cloudstream3.utils.Coroutines.mainWork import com.lagradost.cloudstream3.utils.Coroutines.threadSafeListOf import com.lagradost.cloudstream3.utils.SubtitleHelper.fromCodeToLangTagIETF import com.lagradost.cloudstream3.utils.SubtitleHelper.fromLanguageToTagIETF -import com.lagradost.nicehttp.JsonAsString import com.lagradost.nicehttp.RequestBodyTypes import okhttp3.Interceptor import okhttp3.MediaType.Companion.toMediaTypeOrNull @@ -299,9 +298,9 @@ object APIHolder { "sort" to "SEARCH_MATCH", "type" to "ANIME", ) - ).toJson() + ).toJson().toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) - return app.post("https://graphql.anilist.co", json = JsonAsString(data)) + return app.post("https://graphql.anilist.co", requestBody = data) .parsedSafe() } } diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt index 0c6904cfbdf..b3ed79f4c6c 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt @@ -8,8 +8,9 @@ import com.lagradost.cloudstream3.utils.ExtractorLinkType import com.lagradost.cloudstream3.utils.INFER_TYPE import com.lagradost.cloudstream3.utils.newExtractorLink import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.nicehttp.JsonAsString import com.lagradost.nicehttp.RequestBodyTypes +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.RequestBody.Companion.toRequestBody class Streamlare : Slmaxed() { @@ -43,7 +44,7 @@ open class Slmaxed : ExtractorApi() { val id = embedRegex.find(url)!!.groupValues[1] val json = app.post( "${mainUrl}api/video/stream/get", - json = JsonAsString("""{"id":"$id"}""") + requestBody = """{"id":"$id"}""".toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) ).parsed() return json.result?.mapNotNull { it.value.let { result -> From 20bf3efbe0dcc8508102a672ef2969b61010e750 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Mon, 11 May 2026 14:38:28 -0600 Subject: [PATCH 078/116] - --- .../kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt index b3ed79f4c6c..da2dd62bef5 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Streamlare.kt @@ -66,4 +66,4 @@ open class Slmaxed : ExtractorApi() { } } } -} +} \ No newline at end of file From 390bbcc6b6adc6cfa5bfb8f0b099cc7bdaec96b7 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Mon, 11 May 2026 21:03:14 -0600 Subject: [PATCH 079/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d2683473c41..991cfd9e4e3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "a737f92e53" +nicehttp = "a344f194e6" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 7d3c37c56fa15251d21239f5279941cf23198493 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Mon, 11 May 2026 21:34:36 -0600 Subject: [PATCH 080/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 991cfd9e4e3..6cb54f29530 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "a344f194e6" +nicehttp = "222a333a5f" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 412a8269cf9a4c577e69f418ae9c70e4266476dd Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 10:28:06 -0600 Subject: [PATCH 081/116] Update --- .../cloudstream3/network/DdosGuardKiller.kt | 73 ++++++++----------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt index 7b36be730b0..c5065540421 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt @@ -2,18 +2,17 @@ package com.lagradost.cloudstream3.network import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app -import com.lagradost.nicehttp.HttpSendInterceptorContext -import com.lagradost.nicehttp.Interceptor import com.lagradost.nicehttp.Requests -import com.lagradost.nicehttp.getRequestCookies -import io.ktor.client.call.* -import io.ktor.client.request.* -import io.ktor.http.* +import com.lagradost.nicehttp.cookies +import kotlinx.coroutines.runBlocking +import okhttp3.Interceptor +import okhttp3.Request +import okhttp3.Response /** * @param alwaysBypass will pre-emptively fetch ddos guard cookies if true. * If false it will only try to get cookies when a request returns 403 - */ + * */ // As seen in https://github.com/anime-dl/anime-downloader/blob/master/anime_downloader/sites/erairaws.py @AnyThread class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor { @@ -21,48 +20,40 @@ class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor { private var ddosBypassPath: String? = null - override suspend fun intercept(ctx: HttpSendInterceptorContext): HttpClientCall { - val request = ctx.request - if (alwaysBypass) return bypassDdosGuard(request, ctx) + override fun intercept(chain: Interceptor.Chain): Response = runBlocking { + val request = chain.request() + if (alwaysBypass) return@runBlocking bypassDdosGuard(request) - val call = ctx.proceed() - return if (call.response.status.value == 403) { - bypassDdosGuard(request, ctx) - } else call + val response = chain.proceed(request) + return@runBlocking if (response.code == 403) { + bypassDdosGuard(request) + } else response } - private suspend fun bypassDdosGuard( - request: HttpRequestBuilder, - ctx: HttpSendInterceptorContext, - ): HttpClientCall { + private suspend fun bypassDdosGuard(request: Request): Response { ddosBypassPath = ddosBypassPath ?: Regex("'(.*?)'").find( - app.get("https://check.ddos-guard.net/check.js").text() + app.get( + "https://check.ddos-guard.net/check.js" + ).text )?.groupValues?.get(1) - val host = request.url.host - val scheme = request.url.protocol.name - - val cookies = savedCookiesMap[host] + val cookies = + savedCookiesMap[request.url.host] // If no cookies are found fetch and save em. - ?: "$scheme://$host${ddosBypassPath ?: ""}".let { - // Somehow app.get fails - Requests().get(it).cookies.also { cookies -> - savedCookiesMap[host] = cookies + ?: (request.url.scheme + "://" + request.url.host + (ddosBypassPath ?: "")).let { + // Somehow app.get fails + Requests().get(it).cookies.also { cookies -> + savedCookiesMap[request.url.host] = cookies + } } - } - - // Use getRequestCookies() from commonMain to extract existing cookies - val existingCookies = request.headers.build().getRequestCookies() - val mergedCookies = existingCookies + cookies - return ctx.proceed { - headers.remove("Cookie") - if (mergedCookies.isNotEmpty()) { - header( - "Cookie", - mergedCookies.entries.joinToString("; ") { "${it.key}=${it.value}" } - ) - } - } + val headers = getHeaders(request.headers.toMap(), cookies + request.cookies) + val okHttpClient = (app.baseClient.engine as? io.ktor.client.engine.okhttp.OkHttpEngine) + ?.config?.preconfigured ?: okhttp3.OkHttpClient() + return okHttpClient.newCall( + request.newBuilder() + .headers(headers) + .build() + ).execute() } } From 879a416b8eedb06abb53a2d9e18dd77a25cb646e Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 10:36:01 -0600 Subject: [PATCH 082/116] Use okhttp headers --- .../cloudstream3/network/RequestsHelper.kt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt index 4badc5ed87c..6302d02217e 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt @@ -12,9 +12,9 @@ import io.ktor.client.* import io.ktor.client.engine.okhttp.* import io.ktor.client.plugins.* import io.ktor.client.plugins.cache.* -import io.ktor.http.Headers -import io.ktor.http.headers import okhttp3.Cache +import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders import okhttp3.OkHttpClient import org.conscrypt.Conscrypt import java.io.File @@ -92,10 +92,13 @@ private val DEFAULT_HEADERS = mapOf("user-agent" to USER_AGENT) */ fun getHeaders( headers: Map, - cookie: Map, -): Headers = headers { - (DEFAULT_HEADERS + headers).forEach { (k, v) -> append(k, v) } - if (cookie.isNotEmpty()) { - append("Cookie", cookie.entries.joinToString(" ") { "${it.key}=${it.value};" }) - } + cookie: Map +): Headers { + val cookieMap = + if (cookie.isNotEmpty()) mapOf( + "Cookie" to cookie.entries.joinToString(" ") { + "${it.key}=${it.value};" + }) else mapOf() + val tempHeaders = (DEFAULT_HEADERS + headers + cookieMap) + return tempHeaders.toHeaders() } From b6ebd5e9ed5f12d32c80abfcd51831ef1d67ef51 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 11:00:23 -0600 Subject: [PATCH 083/116] Back-compat CF interceptor --- .../cloudstream3/network/CloudflareKiller.kt | 137 ++++++++---------- 1 file changed, 61 insertions(+), 76 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 1d2e7278c35..d45615ed1eb 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -6,22 +6,22 @@ import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe -import com.lagradost.nicehttp.HttpSendInterceptorContext -import com.lagradost.nicehttp.Interceptor -import com.lagradost.nicehttp.buildHeaders -import com.lagradost.nicehttp.getRequestCookies -import io.ktor.client.call.* -import io.ktor.client.request.* -import io.ktor.http.* +import com.lagradost.nicehttp.Requests.Companion.await +import com.lagradost.nicehttp.cookies +import kotlinx.coroutines.runBlocking +import okhttp3.Headers +import okhttp3.Interceptor +import okhttp3.Request +import okhttp3.Response import java.net.URI + @AnyThread class CloudflareKiller : Interceptor { companion object { const val TAG = "CloudflareKiller" private val ERROR_CODES = listOf(403, 503) private val CLOUDFLARE_SERVERS = listOf("cloudflare-nginx", "cloudflare") - fun parseCookieMap(cookie: String): Map { return cookie.split(";").associate { val split = it.split("=") @@ -42,43 +42,38 @@ class CloudflareKiller : Interceptor { /** * Gets the headers with cookies, webview user agent included! - */ + * */ fun getCookieHeaders(url: String): Headers { val userAgentHeaders = WebViewResolver.webViewUserAgent?.let { mapOf("user-agent" to it) } ?: emptyMap() - return buildHeaders( - userAgentHeaders, - referer = null, - cookie = savedCookies[URI(url).host] ?: emptyMap() - ) - } - - override suspend fun intercept(ctx: HttpSendInterceptorContext): HttpClientCall { - val request = ctx.request - val host = request.url.host - val cookies = savedCookies[host] - if (cookies != null) { - return proceed(request, cookies, ctx) - } - - val call = ctx.proceed() - val serverHeader = call.response.headers["Server"] - val code = call.response.status.value - - if (!(serverHeader in CLOUDFLARE_SERVERS && code in ERROR_CODES)) { - return call - } + return getHeaders(userAgentHeaders, savedCookies[URI(url).host] ?: emptyMap()) + } - // Cloudflare detected — try to bypass - bypassCloudflare(request, ctx)?.let { - Log.d(TAG, "Succeeded bypassing cloudflare: ${request.url.buildString()}") - return it + override fun intercept(chain: Interceptor.Chain): Response = runBlocking { + val request = chain.request() + + when (val cookies = savedCookies[request.url.host]) { + null -> { + val response = chain.proceed(request) + if(!(response.header("Server") in CLOUDFLARE_SERVERS && response.code in ERROR_CODES)) { + return@runBlocking response + } else { + response.close() + bypassCloudflare(request)?.let { + Log.d(TAG, "Succeeded bypassing cloudflare: ${request.url}") + return@runBlocking it + } + } + } + else -> { + return@runBlocking proceed(request, cookies) + } } - debugWarning({ true }) { "Failed cloudflare at: ${request.url.buildString()}" } - return ctx.proceed() + debugWarning({ true }) { "Failed cloudflare at: ${request.url}" } + return@runBlocking chain.proceed(request) } private fun getWebViewCookie(url: String): String? { @@ -88,68 +83,58 @@ class CloudflareKiller : Interceptor { } /** - * Returns true if the cf cookies were successfully fetched from the CookieManager. + * Returns true if the cf cookies were successfully fetched from the CookieManager * Also saves the cookies. - */ - private fun trySolveWithSavedCookies(url: String, host: String): Boolean { - return getWebViewCookie(url)?.let { cookie -> + * */ + private fun trySolveWithSavedCookies(request: Request): Boolean { + // Not sure if this takes expiration into account + return getWebViewCookie(request.url.toString())?.let { cookie -> cookie.contains("cf_clearance").also { solved -> - if (solved) savedCookies[host] = parseCookieMap(cookie) + if (solved) savedCookies[request.url.host] = parseCookieMap(cookie) } } ?: false } - private suspend fun proceed( - request: HttpRequestBuilder, - cookies: Map, - ctx: HttpSendInterceptorContext, - ): HttpClientCall { + private suspend fun proceed(request: Request, cookies: Map): Response { val userAgentMap = WebViewResolver.getWebViewUserAgent()?.let { mapOf("user-agent" to it) } ?: emptyMap() - val existingCookies = request.headers.build().getRequestCookies() - val mergedCookies = existingCookies + cookies - - return ctx.proceed { - userAgentMap.forEach { (k, v) -> - headers.remove(k) - headers.append(k, v) - } - headers.remove("Cookie") - if (mergedCookies.isNotEmpty()) { - header( - "Cookie", - mergedCookies.entries.joinToString("; ") { "${it.key}=${it.value}" } - ) - } - } + val headers = + getHeaders(request.headers.toMap() + userAgentMap, cookies + request.cookies) + val okHttpClient = (app.baseClient.engine as? io.ktor.client.engine.okhttp.OkHttpEngine) + ?.config?.preconfigured ?: okhttp3.OkHttpClient() + return okHttpClient.newCall( + request.newBuilder() + .headers(headers) + .build() + ).await() } - private suspend fun bypassCloudflare( - request: HttpRequestBuilder, - ctx: HttpSendInterceptorContext, - ): HttpClientCall? { - val url = request.url.buildString() - val host = request.url.host + private suspend fun bypassCloudflare(request: Request): Response? { + val url = request.url.toString() - if (!trySolveWithSavedCookies(url, host)) { - Log.d(TAG, "Loading webview to solve cloudflare for $url") + // If no cookies then try to get them + // Remove this if statement if cookies expire + if (!trySolveWithSavedCookies(request)) { + Log.d(TAG, "Loading webview to solve cloudflare for ${request.url}") WebViewResolver( // Never exit based on url Regex(".^"), // Cloudflare needs default user agent userAgent = null, - // Cannot use okhttp (intercepting cookies fails which causes the issues) + // Cannot use okhttp (i think intercepting cookies fails which causes the issues) useOkhttp = false, // Match every url for the requestCallBack additionalUrls = listOf(Regex(".")) - ).resolveUsingWebView(url) { - trySolveWithSavedCookies(url, host) + ).resolveUsingWebView( + url + ) { + trySolveWithSavedCookies(request) } } - val cookies = savedCookies[host] ?: return null - return proceed(request, cookies, ctx) + val cookies = savedCookies[request.url.host] ?: return null + return proceed(request, cookies) } } From 6720c5887fa87e6caa837318ed924742a7c94ea6 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 11:08:35 -0600 Subject: [PATCH 084/116] Fix --- .../cloudstream3/network/CloudflareKiller.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index d45615ed1eb..ea0a2f5cad0 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -9,10 +9,8 @@ import com.lagradost.cloudstream3.mvvm.safe import com.lagradost.nicehttp.Requests.Companion.await import com.lagradost.nicehttp.cookies import kotlinx.coroutines.runBlocking -import okhttp3.Headers -import okhttp3.Interceptor -import okhttp3.Request -import okhttp3.Response +import kotlinx.coroutines.suspendCancellableCoroutine +import okhttp3.* import java.net.URI @@ -28,6 +26,14 @@ class CloudflareKiller : Interceptor { (split.getOrNull(0)?.trim() ?: "") to (split.getOrNull(1)?.trim() ?: "") }.filter { it.key.isNotBlank() && it.value.isNotBlank() } } + + suspend inline fun Call.await(): Response { + return suspendCancellableCoroutine { continuation -> + val callback = ContinuationCallback(this, continuation) + enqueue(callback) + continuation.invokeOnCancellation(callback) + } + } } init { From a6bdb12110cf1d2110b749a7c202ae1a0e480ae4 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 11:09:00 -0600 Subject: [PATCH 085/116] Fix --- .../java/com/lagradost/cloudstream3/network/CloudflareKiller.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index ea0a2f5cad0..7e8ef1c12e6 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -6,7 +6,6 @@ import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe -import com.lagradost.nicehttp.Requests.Companion.await import com.lagradost.nicehttp.cookies import kotlinx.coroutines.runBlocking import kotlinx.coroutines.suspendCancellableCoroutine From b4366eb905162d2699c2f0e1607655fc82c608c7 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 11:17:42 -0600 Subject: [PATCH 086/116] Fix --- .../cloudstream3/network/CloudflareKiller.kt | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 7e8ef1c12e6..2b3cdc60a91 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -7,12 +7,51 @@ import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe import com.lagradost.nicehttp.cookies +import kotlin.coroutines.resumeWithException +import kotlinx.coroutines.CancellableContinuation +import kotlinx.coroutines.CompletionHandler +import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.runBlocking import kotlinx.coroutines.suspendCancellableCoroutine import okhttp3.* import java.net.URI +//Provides async-able Calls +class ContinuationCallback( + private val call: Call, + private val continuation: CancellableContinuation +) : Callback, CompletionHandler { + + @OptIn(ExperimentalCoroutinesApi::class) + override fun onResponse(call: Call, response: Response) { + continuation.resume(response, null) + } + + override fun onFailure(call: Call, e: java.io.IOException) { + // Cannot throw exception on SocketException since that can lead to un-catchable crashes + // when you exit an activity as a request + println("Exception in NiceHttp: ${e.javaClass.name} ${e.message}") + if (call.isCanceled()) { + // Must be able to throw errors, for example timeouts + if (e is java.io.InterruptedIOException) + continuation.cancel(e) + else + e.printStackTrace() + } else { + continuation.resumeWithException(e) + } + } + + override fun invoke(cause: Throwable?) { + try { + call.cancel() + } catch (_: Throwable) { + } + } +} + + @AnyThread class CloudflareKiller : Interceptor { companion object { From 97bd241768885254b7a867f0ea791149e8ff4d7e Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 13:04:59 -0600 Subject: [PATCH 087/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6cb54f29530..76748199fbe 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "222a333a5f" +nicehttp = "89c2512934" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 3b7f979caa1a02fe86c1f8c4809072fd218ff1cc Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 13:49:33 -0600 Subject: [PATCH 088/116] Update --- gradle/libs.versions.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 76748199fbe..21fc930bcdc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "89c2512934" +nicehttp = "fff7fea636" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" @@ -103,8 +103,8 @@ navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version. newpipeextractor = { module = "com.github.teamnewpipe:NewPipeExtractor", version.ref = "newpipeextractor" } nextlib-media3ext = { module = "io.github.anilbeesetti:nextlib-media3ext", version.ref = "nextlibMedia3" } nextlib-mediainfo = { module = "io.github.anilbeesetti:nextlib-mediainfo", version.ref = "nextlibMedia3" } -nicehttp = { module = "com.github.Luna712.NiceHttp-kmp:library-android", version.ref = "nicehttp" } -nicehttp-jvm = { module = "com.github.Luna712.NiceHttp-kmp:library-jvm", version.ref = "nicehttp" } +nicehttp = { module = "com.github.Luna712.NiceHttp-kmp:library", version.ref = "nicehttp" } +nicehttp-android = { module = "com.github.Luna712.NiceHttp-kmp:library-android", version.ref = "nicehttp" } overlappingpanels = { module = "com.github.discord:OverlappingPanels", version.ref = "overlappingpanels" } palette-ktx = { module = "androidx.palette:palette-ktx", version.ref = "paletteKtx" } preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } From c64eb51a03f7f35c1acf8ae2ab3fd4a4eea8df6d Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 13:50:31 -0600 Subject: [PATCH 089/116] Update --- library/build.gradle.kts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/library/build.gradle.kts b/library/build.gradle.kts index b7117ce1049..cf3c3aff5bc 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -54,6 +54,7 @@ kotlin { commonMain.dependencies { implementation(libs.annotation) // Annotations + implementation(libs.nicehttp) // HTTP Lib implementation(libs.jackson.module.kotlin) // JSON Parser implementation(libs.kotlinx.coroutines.core) implementation(libs.fuzzywuzzy) // Match Extractors @@ -62,14 +63,6 @@ kotlin { implementation(libs.newpipeextractor) implementation(libs.tmdb.java) // TMDB API v3 Wrapper Made with RetroFit } - - androidMain.dependencies { - implementation(libs.nicehttp) // HTTP Lib - } - - jvmMain.dependencies { - implementation(libs.nicehttp.jvm) // HTTP Lib - } } } From 98a8678992f6e1b15a98c5779fe50911cb29b9f3 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 13:51:13 -0600 Subject: [PATCH 090/116] Update --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3982f09c932..fdcdbc6f1dd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -268,7 +268,7 @@ dependencies { // Downloading & Networking implementation(libs.work.runtime.ktx) - implementation(libs.nicehttp) // HTTP Lib + implementation(libs.nicehttp.android) // HTTP Lib implementation(project(":library")) } From c3024b4632c8f7245069293f93e2a52bceca1721 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 13:58:48 -0600 Subject: [PATCH 091/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 21fc930bcdc..1c3b589ceb3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "fff7fea636" +nicehttp = "8f32c9ba33" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 7e84792a6642663e996645382e23a999ed54c2be Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 17:42:11 -0600 Subject: [PATCH 092/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1c3b589ceb3..fd74f23c07a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "8f32c9ba33" +nicehttp = "0a34f1a1e0" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 9f0f0a61aa8fcc35d60cd1712b6e1c3e5d0f91bd Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 18:31:39 -0600 Subject: [PATCH 093/116] Fix --- .../cloudstream3/metaproviders/MyDramaList.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt index e2752175e75..4982a77e2fc 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/MyDramaList.kt @@ -29,6 +29,7 @@ import com.lagradost.cloudstream3.newTvSeriesSearchResponse import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.nicehttp.HeadersInterceptor +import io.ktor.http.HttpHeaders import java.text.SimpleDateFormat import java.util.Locale @@ -48,12 +49,10 @@ abstract class MyDramaListAPI : MainAPI() { val API_KEY: String = BuildConfig.MDL_API_KEY const val API_HOST = "https://api.mydramalist.com/v1" const val SITE_HOST = "https://mydramalist.com" - private val headerInterceptor = HeadersInterceptor( - mapOf( - "user-agent" to "Dart/3.6 (dart:io)", - "mdl-api-key" to API_KEY, - ) - ) + private val headerInterceptor = HeadersInterceptor { + header(HttpHeaders.UserAgent, "Dart/3.6 (dart:io)") + header("mdl-api-key", API_KEY) + } } override val mainPage = mainPageOf( From 77be369c07bc5861fb5d44d25165996c68bf90f7 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Tue, 12 May 2026 21:26:54 -0600 Subject: [PATCH 094/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fd74f23c07a..f070f331535 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "0a34f1a1e0" +nicehttp = "f5a8add65b" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 12baec2806e14b186e9dc273b9517a332c009a53 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:01:15 -0600 Subject: [PATCH 095/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f070f331535..06deb750875 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "f5a8add65b" +nicehttp = "6d351c53af" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 2fc1c9ae4f682931dbd2a99d44e54f3a98df0076 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:07:54 -0600 Subject: [PATCH 096/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 06deb750875..2e211a86f0c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "6d351c53af" +nicehttp = "509ff15247" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From d67e4333cb2cf034f58bc15df4d94c42ea2ee5f8 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:10:15 -0600 Subject: [PATCH 097/116] - --- .../cloudstream3/network/CloudflareKiller.kt | 58 ++----------------- 1 file changed, 6 insertions(+), 52 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 2b3cdc60a91..57a409e11be 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -6,52 +6,16 @@ import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe +import com.lagradost.nicehttp.RequestsCompat import com.lagradost.nicehttp.cookies -import kotlin.coroutines.resumeWithException -import kotlinx.coroutines.CancellableContinuation -import kotlinx.coroutines.CompletionHandler -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.runBlocking -import kotlinx.coroutines.suspendCancellableCoroutine -import okhttp3.* +import okhttp3.Headers +import okhttp3.Interceptor +import okhttp3.Request +import okhttp3.Response import java.net.URI -//Provides async-able Calls -class ContinuationCallback( - private val call: Call, - private val continuation: CancellableContinuation -) : Callback, CompletionHandler { - - @OptIn(ExperimentalCoroutinesApi::class) - override fun onResponse(call: Call, response: Response) { - continuation.resume(response, null) - } - - override fun onFailure(call: Call, e: java.io.IOException) { - // Cannot throw exception on SocketException since that can lead to un-catchable crashes - // when you exit an activity as a request - println("Exception in NiceHttp: ${e.javaClass.name} ${e.message}") - if (call.isCanceled()) { - // Must be able to throw errors, for example timeouts - if (e is java.io.InterruptedIOException) - continuation.cancel(e) - else - e.printStackTrace() - } else { - continuation.resumeWithException(e) - } - } - - override fun invoke(cause: Throwable?) { - try { - call.cancel() - } catch (_: Throwable) { - } - } -} - - @AnyThread class CloudflareKiller : Interceptor { companion object { @@ -64,14 +28,6 @@ class CloudflareKiller : Interceptor { (split.getOrNull(0)?.trim() ?: "") to (split.getOrNull(1)?.trim() ?: "") }.filter { it.key.isNotBlank() && it.value.isNotBlank() } } - - suspend inline fun Call.await(): Response { - return suspendCancellableCoroutine { continuation -> - val callback = ContinuationCallback(this, continuation) - enqueue(callback) - continuation.invokeOnCancellation(callback) - } - } } init { @@ -146,9 +102,7 @@ class CloudflareKiller : Interceptor { val headers = getHeaders(request.headers.toMap() + userAgentMap, cookies + request.cookies) - val okHttpClient = (app.baseClient.engine as? io.ktor.client.engine.okhttp.OkHttpEngine) - ?.config?.preconfigured ?: okhttp3.OkHttpClient() - return okHttpClient.newCall( + return app.baseClient.newCall( request.newBuilder() .headers(headers) .build() From f9cd6bb330e9312e17331e41906d4525d4c2747a Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:12:18 -0600 Subject: [PATCH 098/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2e211a86f0c..a3f2500ce28 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "509ff15247" +nicehttp = "85d53feb72" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 76cc5fdc8de8034f875a118235bedf835f141ccc Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:16:09 -0600 Subject: [PATCH 099/116] Fix --- .../java/com/lagradost/cloudstream3/network/CloudflareKiller.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 57a409e11be..0ad2a2ee04d 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -6,7 +6,7 @@ import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe -import com.lagradost.nicehttp.RequestsCompat +import com.lagradost.nicehttp.RequestsCompat.* import com.lagradost.nicehttp.cookies import kotlinx.coroutines.runBlocking import okhttp3.Headers From 557c074a0ba43614eaa396c9c7ce31447f65d77a Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:23:03 -0600 Subject: [PATCH 100/116] Update --- .../com/lagradost/cloudstream3/network/RequestsHelper.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt index 6302d02217e..c0e457d5746 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt @@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.network import android.content.Context import androidx.preference.PreferenceManager +import com.lagradost.cloudstream3.InternalAPI import com.lagradost.cloudstream3.Prerelease import com.lagradost.cloudstream3.R import com.lagradost.cloudstream3.USER_AGENT @@ -84,6 +85,11 @@ fun buildDefaultKtorClient(context: Context, ignoreSSL: Boolean = false): HttpCl } } +// TODO: Remove usage of this by migrating interceptors and media3 to ktor +@InternalAPI +val okHttpClient = (app.baseClient.engine as? OkHttpEngine) + ?.config?.preconfigured ?: OkHttpClient() + private val DEFAULT_HEADERS = mapOf("user-agent" to USER_AGENT) /** From 23c420adf90f654345c27082c35b755e243ac7a4 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:24:35 -0600 Subject: [PATCH 101/116] Update --- .../java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt index c5065540421..5c1ae75b2af 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt @@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.network import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.okHttpClient import com.lagradost.nicehttp.Requests import com.lagradost.nicehttp.cookies import kotlinx.coroutines.runBlocking @@ -48,8 +49,6 @@ class DdosGuardKiller(private val alwaysBypass: Boolean) : Interceptor { } val headers = getHeaders(request.headers.toMap(), cookies + request.cookies) - val okHttpClient = (app.baseClient.engine as? io.ktor.client.engine.okhttp.OkHttpEngine) - ?.config?.preconfigured ?: okhttp3.OkHttpClient() return okHttpClient.newCall( request.newBuilder() .headers(headers) From 8fbed9c22a5114733ab9fc55edde86826172d366 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:25:32 -0600 Subject: [PATCH 102/116] Fix --- .../com/lagradost/cloudstream3/network/CloudflareKiller.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 0ad2a2ee04d..a181dc944f8 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -6,6 +6,7 @@ import androidx.annotation.AnyThread import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe +import com.lagradost.cloudstream3.okHttpClient import com.lagradost.nicehttp.RequestsCompat.* import com.lagradost.nicehttp.cookies import kotlinx.coroutines.runBlocking @@ -102,7 +103,7 @@ class CloudflareKiller : Interceptor { val headers = getHeaders(request.headers.toMap() + userAgentMap, cookies + request.cookies) - return app.baseClient.newCall( + return okHttpClient.newCall( request.newBuilder() .headers(headers) .build() From 41a18f7dd08ffbfb3ebc821cdeff31f2f5dcb6d1 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:27:50 -0600 Subject: [PATCH 103/116] Update --- .../com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt index 46a49588e98..513b772320b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt @@ -86,6 +86,7 @@ import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugAssert import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.mvvm.safe +import com.lagradost.cloudstream3.okHttpClient import com.lagradost.cloudstream3.ui.player.CustomDecoder.Companion.fixSubtitleAlignment import com.lagradost.cloudstream3.ui.player.live.LiveHelper import com.lagradost.cloudstream3.ui.player.live.PREFERRED_LIVE_OFFSET @@ -737,9 +738,6 @@ class CS3IPlayer : IPlayer { headers: Map?, interceptor: Interceptor? ): HttpDataSource.Factory { - val okHttpClient = (app.baseClient.engine as? io.ktor.client.engine.okhttp.OkHttpEngine) - ?.config?.preconfigured ?: okhttp3.OkHttpClient() - val client = if (interceptor == null) { okHttpClient } else { @@ -799,10 +797,6 @@ class CS3IPlayer : IPlayer { it.key.equals("User-Agent", ignoreCase = true) }?.value ?: USER_AGENT - val baseOkHttpClient = (app.baseClient.engine as io.ktor.client.engine.okhttp.OkHttpEngine) - .config - .preconfigured!! - val source = if (interceptor == null) { if (engine == null) { Log.d(TAG, "Using DefaultHttpDataSource for $link") @@ -818,7 +812,7 @@ class CS3IPlayer : IPlayer { } } else { Log.d(TAG, "Using OkHttpDataSource for $link") - val client = baseOkHttpClient.newBuilder() + val client = okHttpClient.newBuilder() .addInterceptor(interceptor) .build() OkHttpDataSource.Factory(client).setUserAgent(userAgent) From 3d29e61cebb4bf6e7074ebf9e13008f1b35ecea6 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:28:32 -0600 Subject: [PATCH 104/116] Fix --- .../java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt index 513b772320b..902f24135ec 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt @@ -800,7 +800,7 @@ class CS3IPlayer : IPlayer { val source = if (interceptor == null) { if (engine == null) { Log.d(TAG, "Using DefaultHttpDataSource for $link") - OkHttpDataSource.Factory(baseOkHttpClient).setUserAgent(userAgent) + OkHttpDataSource.Factory(okHttpClient).setUserAgent(userAgent) } else { Log.d(TAG, "Using CronetDataSource for $link") CronetDataSource.Factory(engine, Executors.newSingleThreadExecutor()) From 27cfbd4f0c7df7083a51941cafd69268b848e58f Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:33:15 -0600 Subject: [PATCH 105/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a3f2500ce28..1af02e2a1c1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "85d53feb72" +nicehttp = "1e9caf4390" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 9a420d31e6c3b648763680ec9d2b070b1369508f Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:38:12 -0600 Subject: [PATCH 106/116] Fix --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1af02e2a1c1..01629006af5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "1e9caf4390" +nicehttp = "bb399f8a06" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 6a865facbd277cc1ad37eb920e519adcabc88a29 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:54:33 -0600 Subject: [PATCH 107/116] Update --- .../java/com/lagradost/cloudstream3/network/CloudflareKiller.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index a181dc944f8..bc64f64ac3a 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -7,7 +7,7 @@ import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.mvvm.debugWarning import com.lagradost.cloudstream3.mvvm.safe import com.lagradost.cloudstream3.okHttpClient -import com.lagradost.nicehttp.RequestsCompat.* +import com.lagradost.nicehttp.RequestsCompat.await import com.lagradost.nicehttp.cookies import kotlinx.coroutines.runBlocking import okhttp3.Headers From 8e0d753ed2daacee5df88fff1efa6f18f231fc1e Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:56:05 -0600 Subject: [PATCH 108/116] - --- .../com/lagradost/cloudstream3/network/RequestsHelper.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt index c0e457d5746..ac366f9d273 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt @@ -85,11 +85,6 @@ fun buildDefaultKtorClient(context: Context, ignoreSSL: Boolean = false): HttpCl } } -// TODO: Remove usage of this by migrating interceptors and media3 to ktor -@InternalAPI -val okHttpClient = (app.baseClient.engine as? OkHttpEngine) - ?.config?.preconfigured ?: OkHttpClient() - private val DEFAULT_HEADERS = mapOf("user-agent" to USER_AGENT) /** From e4d14329c26292dd69d08e829b600b5b0c6fc1e7 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:59:17 -0600 Subject: [PATCH 109/116] - --- .../java/com/lagradost/cloudstream3/network/RequestsHelper.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt index ac366f9d273..6302d02217e 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt @@ -2,7 +2,6 @@ package com.lagradost.cloudstream3.network import android.content.Context import androidx.preference.PreferenceManager -import com.lagradost.cloudstream3.InternalAPI import com.lagradost.cloudstream3.Prerelease import com.lagradost.cloudstream3.R import com.lagradost.cloudstream3.USER_AGENT From 6e56ed86831921beeb3336031d3fb1ea35dcf666 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 14:59:24 -0600 Subject: [PATCH 110/116] Add --- .../kotlin/com/lagradost/cloudstream3/MainActivity.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt index a74097fd5f4..8c64dc7ceff 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainActivity.kt @@ -8,6 +8,8 @@ import com.fleeksoft.ksoup.nodes.Document import com.lagradost.nicehttp.NiceResponse import com.lagradost.nicehttp.Requests import com.lagradost.nicehttp.ResponseParser +import io.ktor.client.engine.okhttp.OkHttpEngine +import okhttp3.OkHttpClient import kotlin.reflect.KClass // Short name for requests client to make it nicer to use @@ -40,6 +42,11 @@ var app = Requests(responseParser = jacksonResponseParser).apply { defaultHeaders = mapOf("user-agent" to USER_AGENT) } +// TODO: Remove usage of this by migrating interceptors and media3 to ktor +@InternalAPI +val okHttpClient = (app.baseClient.engine as? OkHttpEngine) + ?.config?.preconfigured ?: OkHttpClient() + /** Parses the response body as a Ksoup Document. */ val NiceResponse.ksoupDocument: Document get() = Ksoup.parse(text) @@ -50,4 +57,4 @@ val NiceResponse.ksoupDocument: Document @UnsafeSSL var insecureApp = Requests(responseParser = jacksonResponseParser).apply { defaultHeaders = mapOf("user-agent" to USER_AGENT) -} \ No newline at end of file +} From 633aaf77bac6d14cbf630978dbc058c4cdb9b0e9 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 15:07:34 -0600 Subject: [PATCH 111/116] Fix --- .../java/com/lagradost/cloudstream3/network/CloudflareKiller.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index bc64f64ac3a..f9c76ad19ae 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -103,6 +103,7 @@ class CloudflareKiller : Interceptor { val headers = getHeaders(request.headers.toMap() + userAgentMap, cookies + request.cookies) + @Suppress("DEPRECATION_ERROR") return okHttpClient.newCall( request.newBuilder() .headers(headers) From edd0255e4f362e5e74154058a724ca9977523f61 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 15:13:18 -0600 Subject: [PATCH 112/116] Test --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index fdcdbc6f1dd..3982f09c932 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -268,7 +268,7 @@ dependencies { // Downloading & Networking implementation(libs.work.runtime.ktx) - implementation(libs.nicehttp.android) // HTTP Lib + implementation(libs.nicehttp) // HTTP Lib implementation(project(":library")) } From 438f6154605f8ea92f9d03116ace35e323c44738 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Wed, 13 May 2026 15:16:09 -0600 Subject: [PATCH 113/116] - --- gradle/libs.versions.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 01629006af5..2857464a6d9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -104,7 +104,6 @@ newpipeextractor = { module = "com.github.teamnewpipe:NewPipeExtractor", version nextlib-media3ext = { module = "io.github.anilbeesetti:nextlib-media3ext", version.ref = "nextlibMedia3" } nextlib-mediainfo = { module = "io.github.anilbeesetti:nextlib-mediainfo", version.ref = "nextlibMedia3" } nicehttp = { module = "com.github.Luna712.NiceHttp-kmp:library", version.ref = "nicehttp" } -nicehttp-android = { module = "com.github.Luna712.NiceHttp-kmp:library-android", version.ref = "nicehttp" } overlappingpanels = { module = "com.github.discord:OverlappingPanels", version.ref = "overlappingpanels" } palette-ktx = { module = "androidx.palette:palette-ktx", version.ref = "paletteKtx" } preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } From a104a2667fccef3b9e03e6f60d2ba4b30dc81573 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 15 May 2026 15:33:24 -0600 Subject: [PATCH 114/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2857464a6d9..c9e1e1152e3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "bb399f8a06" +nicehttp = "72aa4defa7" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 24a063abfe61ab93f17ab21cf937102c5740ced3 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 15 May 2026 16:01:02 -0600 Subject: [PATCH 115/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c9e1e1152e3..54dc15f76d0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "72aa4defa7" +nicehttp = "1d8bfe129d" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1" From 98870f75ace1557736480eb91973ed53d5acb156 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 15 May 2026 17:24:42 -0600 Subject: [PATCH 116/116] Update --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 54dc15f76d0..088af8aca63 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ media3 = "1.9.3" navigationKtx = "2.9.7" newpipeextractor = "v0.26.0" nextlibMedia3 = "1.9.3-0.12.0" -nicehttp = "1d8bfe129d" +nicehttp = "ea97cfd14d" overlappingpanels = "0.1.5" paletteKtx = "1.0.0" preferenceKtx = "1.2.1"