diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/RepoLinkGenerator.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/RepoLinkGenerator.kt index 801378e3..9ac1e2c6 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/RepoLinkGenerator.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/RepoLinkGenerator.kt @@ -15,7 +15,7 @@ class RepoLinkGenerator( ) : IGenerator { companion object { const val TAG = "RepoLink" - val cache: HashMap, MutableSet>> = hashMapOf() + val cache: HashMap, Pair, MutableSet>> = hashMapOf() } override val hasCache = true @@ -71,7 +71,7 @@ class RepoLinkGenerator( val (currentLinkCache, currentSubsCache) = if (clearCache) { Pair(mutableSetOf(), mutableSetOf()) } else { - cache[current.id] ?: Pair(mutableSetOf(), mutableSetOf()) + cache[Pair(current.apiName, current.id)] ?: Pair(mutableSetOf(), mutableSetOf()) } //val currentLinkCache = if (clearCache) mutableSetOf() else linkCache[index].toMutableSet() @@ -137,7 +137,7 @@ class RepoLinkGenerator( } } ) - cache[current.id] = Pair(currentLinkCache, currentSubsCache) + cache[Pair(current.apiName, current.id)] = Pair(currentLinkCache, currentSubsCache) return result } diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsFragment.kt index d10fabff..6987102a 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsFragment.kt @@ -75,9 +75,10 @@ class SettingsFragment : Fragment() { private fun Context.isAutoTv(): Boolean { val uiModeManager = getSystemService(Context.UI_MODE_SERVICE) as UiModeManager? // AFT = Fire TV + val model = Build.MODEL.lowercase() return uiModeManager?.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION || Build.MODEL.contains( "AFT" - ) + ) || model.contains("firestick") || model.contains("fire tv") || model.contains("chromecast") } }