From 90956bd0e276e2ac83be520c67cd623f89eb9daf Mon Sep 17 00:00:00 2001 From: damontecres <154766448+damontecres@users.noreply.github.com> Date: Mon, 17 Nov 2025 22:08:26 -0500 Subject: [PATCH] Fix several playback issues (#240) Fixes issues introduced in #222: - Switching tracks - Downloading subtitles - Trickplay --- .../damontecres/wholphin/ui/playback/PlaybackViewModel.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackViewModel.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackViewModel.kt index 5d069e1e..c7710d68 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackViewModel.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/ui/playback/PlaybackViewModel.kt @@ -244,8 +244,10 @@ class PlaybackViewModel ) return@withContext false } - val isLiveTv = item.type == BaseItemKind.TV_CHANNEL + this@PlaybackViewModel.item = item + this@PlaybackViewModel.itemId = item.id + val isLiveTv = item.type == BaseItemKind.TV_CHANNEL val base = item.data val title = if (base.type == BaseItemKind.EPISODE) { @@ -980,7 +982,7 @@ class PlaybackViewModel delay(1500) item = BaseItem.from( - api.userLibraryApi.getItem(itemId = item.id).content, + api.userLibraryApi.getItem(itemId = it.itemId).content, api, ) val mediaSource = chooseSource(item.data, it)