Fix issue displaying episode information in Series Progress tab when episode has no valid Index Number

This commit is contained in:
HighImKevin committed 2026-04-30 02:40:28 -04:00
1 parent 61d152f4ab
commit 290b36f7bf
1 file changed
+1 -1
+1 -1
View File
@@ -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 <strong>${episodeInfo}</strong> ${timeAgo} on ${formattedDate}.`;
}