From 043119e0467d5f53c357c851d447927ad3a887eb Mon Sep 17 00:00:00 2001 From: aka paul <50n50@noreply.localhost> Date: Sun, 2 Nov 2025 20:54:20 +0000 Subject: [PATCH] Update comet/comet.js --- comet/comet.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/comet/comet.js b/comet/comet.js index e6e3a8f..dd6e91a 100644 --- a/comet/comet.js +++ b/comet/comet.js @@ -1,4 +1,3 @@ - // Settings start const preferedQualityOption = "Auto"; // ["Auto", "2160p", "1080p", "720p", "480p"] const maxResultsPerResolution = 0; @@ -110,15 +109,25 @@ async function extractEpisodes(ID) { let episodeCounter = 0; for (const video of videos) { - if (video.season !== currentSeason) { - currentSeason = video.season; + const adjustedSeason = video.season + 1; + if (adjustedSeason !== currentSeason) { + currentSeason = adjustedSeason; episodeCounter = 0; } episodeCounter++; + let adjustedId = video.id || ""; + if (adjustedId) { + const idParts = adjustedId.split(':'); + if (idParts.length === 3) { + idParts[1] = String(adjustedSeason); + adjustedId = idParts.join(':'); + } + } + results.push({ - href: "TV: " + (video.id || ""), + href: "TV: " + adjustedId, number: episodeCounter }); }