mirror of
https://github.com/yuzono/anime-extensions.git
synced 2026-06-13 13:39:44 +00:00
feat(stremio): update addon retrieval to use context parameters
Failed to compile due to lintKotlin format
This commit is contained in:
@@ -11,6 +11,7 @@ allprojects {
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
compilerOptions {
|
||||
jvmTarget.set(KotlinJvmTarget.JVM_1_8)
|
||||
freeCompilerArgs.add("-Xcontext-parameters")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class Stremio : Source() {
|
||||
private val addonManager by lazy {
|
||||
AddonManager(addonDelegate, authKeyDelegate)
|
||||
}
|
||||
private suspend fun addons() = addonManager.getAddons(this)
|
||||
private suspend fun addons() = addonManager.getAddons()
|
||||
// KMK <--
|
||||
|
||||
// ============================== Popular ===============================
|
||||
|
||||
@@ -27,7 +27,8 @@ class AddonManager(
|
||||
private var cachedAuthKey: String? = null
|
||||
private var addons: List<AddonDto>? = null
|
||||
|
||||
suspend fun getAddons(source: Source): List<AddonDto> {
|
||||
context(source: Source)
|
||||
suspend fun getAddons(): List<AddonDto> {
|
||||
val useAddons = addonValue.isNotBlank()
|
||||
val hasChanged = when {
|
||||
useAddons -> addonValue != cachedAddons
|
||||
|
||||
Reference in New Issue
Block a user