From 290b36f7bfb7587aa12667895ce6395f41d02c73 Mon Sep 17 00:00:00 2001 From: HighImKevin Date: Thu, 30 Apr 2026 02:40:28 -0400 Subject: [PATCH] Fix issue displaying episode information in Series Progress tab when episode has no valid Index Number --- scripts/watchlist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/watchlist.js b/scripts/watchlist.js index bb7aab3..d473095 100644 --- a/scripts/watchlist.js +++ b/scripts/watchlist.js @@ -5714,7 +5714,7 @@ In the Custom Tabs plugin, add a new tab with the following HTML content: if (lastWatchedEpisode) { const timeAgo = formatTimeAgo(lastWatchedEpisode.UserData.LastPlayedDate); const formattedDate = formatLastWatchedDate(lastWatchedEpisode.UserData.LastPlayedDate); - const episodeInfo = `${lastWatchedEpisode.ParentIndexNumber}x${lastWatchedEpisode.IndexNumber.toString().padStart(2, '0')} "${lastWatchedEpisode.Name}"`; + const episodeInfo = lastWatchedEpisode.ParentIndexNumber && lastWatchedEpisode.IndexNumber ? `${lastWatchedEpisode.ParentIndexNumber}x${lastWatchedEpisode.IndexNumber.toString().padStart(2, '0')} ${lastWatchedEpisode.Name}` : lastWatchedEpisode.Name; lastWatchedInfo = `Last watched ${episodeInfo} ${timeAgo} on ${formattedDate}.`; }