From f903c0c32084650d4b96941639115807f73252be Mon Sep 17 00:00:00 2001 From: jmir1 Date: Wed, 24 Nov 2021 00:44:44 +0100 Subject: [PATCH] fix crash when playing episode with external player fails --- .../main/java/eu/kanade/tachiyomi/ui/player/EpisodeLoader.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/player/EpisodeLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/player/EpisodeLoader.kt index 912ba1a66..4c4861560 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/player/EpisodeLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/player/EpisodeLoader.kt @@ -42,11 +42,11 @@ class EpisodeLoader { it?.first() } source is AnimeHttpSource -> isHttp(episode, source).map { - if (it.isEmpty()) error(errorMessage) + if (it.isEmpty()) null else it.first() } source is LocalAnimeSource -> isLocal(episode).map { - if (it.isEmpty()) error(errorMessage) + if (it.isEmpty()) null else it.first() } else -> error("source not supported")