From 23d8e233f2b91e1285a1f4b45511be2db19184d6 Mon Sep 17 00:00:00 2001 From: HighImKevin Date: Tue, 20 Oct 2026 12:59:00 -0400 Subject: [PATCH] Stop linking to the generic Upcoming tv page on Jellyfin v12, link to the details page for Playlists and Collections --- scripts/sectionHelper.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/sectionHelper.js b/scripts/sectionHelper.js index 6ae35d1..b196c1d 100644 --- a/scripts/sectionHelper.js +++ b/scripts/sectionHelper.js @@ -569,7 +569,10 @@ return `#/tv.html?collectionType=tvshows&tab=4&serverId=${ApiClient.serverId()}`; } - if (id === 'upcoming' || id === 'recentlyReleased.episodes') { + // Check for Jellyfin 12, as this universal Upcoming tab is currently broken in Jellyfin 12 + const isJellyfin12 = await window.KefinTweaks.getJellyfinMajorVersion(); + + if (id === 'upcoming' || (id === 'recentlyReleased.episodes' && !isJellyfin12)) { return `#/tv.html?collectionType=tvshows&tab=2&serverId=${ApiClient.serverId()}`; } @@ -633,7 +636,8 @@ // Check for ParentId if (queryOptions.ParentId) { - if (sectionConfig.discoveryType === 'Collection' || sectionConfig.discoveryType === 'Playlist') { + const detailsParentTypes = ['Collection', 'Playlist']; + if (sectionConfig.discoveryType === 'Collection' || sectionConfig.discoveryType === 'Playlist' || detailsParentTypes.includes(activeQuery._parentItemType)) { return `#/details?id=${queryOptions.ParentId}&serverId=${serverId}`; }