From 3cc2bf2dd1be84f556a6ce8ebe6a565c7d473b15 Mon Sep 17 00:00:00 2001 From: Damontecres Date: Fri, 17 Jul 2026 11:23:31 -0400 Subject: [PATCH] Fix resume query for Jellyfin 12 (#1715) ## Description Fixes querying for resume item (continue watching) for Jellyfin 12 so that whole series are not included. The patch is also compatible with Jellyfin 10.11. ### Related issues Fixes #1689 I couldn't find an issue in Jellyfin that mentions this behavior change, so I'm guessing it was a side effect. But since the old query did ask to include Series, I don't think it's a bug in the server. ### Testing Manual API queries & emulator on both Jellyfin 11 & 12-rc2 servers ## Screenshots N/A ## AI or LLM usage None --- .../wholphin/services/LatestNextUpService.kt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/services/LatestNextUpService.kt b/app/src/main/java/com/github/damontecres/wholphin/services/LatestNextUpService.kt index f67dd100..4ce6583f 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/services/LatestNextUpService.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/services/LatestNextUpService.kt @@ -9,7 +9,6 @@ import com.github.damontecres.wholphin.data.model.BaseItem import com.github.damontecres.wholphin.ui.SlimItemFields import com.github.damontecres.wholphin.util.LocalDateTimeSerializer import com.github.damontecres.wholphin.util.WholphinDispatchers -import com.github.damontecres.wholphin.util.supportItemKinds import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.sync.Semaphore @@ -23,6 +22,7 @@ import org.jellyfin.sdk.api.client.extensions.itemsApi import org.jellyfin.sdk.api.client.extensions.tvShowsApi import org.jellyfin.sdk.model.api.BaseItemKind import org.jellyfin.sdk.model.api.ItemSortBy +import org.jellyfin.sdk.model.api.MediaType import org.jellyfin.sdk.model.api.SortOrder import org.jellyfin.sdk.model.api.request.GetNextUpRequest import org.jellyfin.sdk.model.api.request.GetResumeItemsRequest @@ -60,16 +60,8 @@ class LatestNextUpService userId = userId, fields = SlimItemFields, limit = limit, - includeItemTypes = - if (includeEpisodes) { - supportItemKinds - } else { - supportItemKinds - .toMutableSet() - .apply { - remove(BaseItemKind.EPISODE) - } - }, + mediaTypes = listOf(MediaType.VIDEO), + excludeItemTypes = if (!includeEpisodes) listOf(BaseItemKind.EPISODE) else null, enableTotalRecordCount = false, ) val items =