From d29c6c72988a2d9cf3901691f72518962cd9d383 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Mon, 8 Jul 2024 08:39:48 +0300 Subject: [PATCH] fix s print handling --- src/handlers.js | 2 +- test/main.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/handlers.js b/src/handlers.js index 790cfe9..2c4eeb4 100644 --- a/src/handlers.js +++ b/src/handlers.js @@ -63,7 +63,7 @@ exports.addDefaults = /** @type Parser */ parser => { // Source parser.addHandler("source", /\b(?:H[DQ][ .-]*)?CAM(?:H[DQ])?(?:[ .-]*Rip)?\b/i, value("CAM"), { remove: true }); - parser.addHandler("source", /\b(?:H[DQ][ .-]*)?S[ .-]*print/i, value("CAM"), { remove: true }); + parser.addHandler("source", /\b(?:H[DQ][ .-]*)?S[ .-]+print/i, value("CAM"), { remove: true }); parser.addHandler("source", /\b(?:HD[ .-]*)?T(?:ELE)?S(?:YNC)?(?:Rip)?\b/i, value("TeleSync"), { remove: true }); parser.addHandler("source", /\b(?:HD[ .-]*)?T(?:ELE)?C(?:INE)?(?:Rip)?\b/, value("TeleCine"), { remove: true }); parser.addHandler("source", /\bBlu[ .-]*Ray\b(?=.*remux)/i, value("BluRay REMUX"), { remove: true }); diff --git a/test/main.js b/test/main.js index 2138412..c911c49 100644 --- a/test/main.js +++ b/test/main.js @@ -340,4 +340,17 @@ describe("Random releases", () => { languages: ["latino"] }); }); + + it("Sprint.2024.S01.COMPLETE.1080p.WEB.h264-EDITH[TGx]", () => { + const releaseName = "Sprint.2024.S01.COMPLETE.1080p.WEB.h264-EDITH[TGx]"; + expect(parse(releaseName)).to.deep.equal({ + title: "Sprint", + year: 2024, + seasons: [1], + season: 1, + resolution: "1080p", + codec: "h264", + group: "EDITH" + }); + }); });