mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-23 05:13:07 +03:00
fix(tracking): Fix crashing for Jellyfin enhanced tracking (#1658)
This commit is contained in:
parent
7040eb4d83
commit
69b9db4e8e
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.data.track.jellyfin
|
|||
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
|
||||
import eu.kanade.tachiyomi.animesource.sourcePreferences
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.Response
|
||||
import tachiyomi.domain.source.anime.service.AnimeSourceManager
|
||||
|
@ -51,7 +52,7 @@ class JellyfinInterceptor : Interceptor {
|
|||
private fun getApiKey(userId: String): String? {
|
||||
for (i in 1..MAX_JELLYFIN_SOURCES) {
|
||||
val sourceId = getId(i)
|
||||
val preferences = (sourceManager.get(sourceId) as ConfigurableAnimeSource).getSourcePreferences()
|
||||
val preferences = (sourceManager.get(sourceId) as ConfigurableAnimeSource).sourcePreferences()
|
||||
val sourceUserId = preferences.getString("user_id", "")
|
||||
|
||||
if (sourceUserId.isNullOrEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue