Skip to content

Commit

Permalink
fix(tracking): Fix crashing for Jellyfin enhanced tracking (#1658)
Browse files Browse the repository at this point in the history
  • Loading branch information
Secozzi authored Jul 2, 2024
1 parent 7040eb4 commit 69b9db4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit 69b9db4

Please sign in to comment.