diff --git a/src/handlers.js b/src/handlers.js index 66ea6f6..7c59567 100644 --- a/src/handlers.js +++ b/src/handlers.js @@ -283,6 +283,7 @@ exports.addDefaults = /** @type Parser */ parser => { parser.addHandler("languages", /\bes(?=[ .,/-]+(?:[A-Z]{2}[ .,/-]+){2,})\b/i, uniqConcat(value("spanish")), { skipFromTitle: true, skipIfAlreadyFound: false }); parser.addHandler("languages", /\b(?<=[ .,/-]+(?:[A-Z]{2}[ .,/-]+){2,})es\b/i, uniqConcat(value("spanish")), { skipFromTitle: true, skipIfAlreadyFound: false }); parser.addHandler("languages", /\b(?<=[ .,/-]+[A-Z]{2}[ .,/-]+)es(?=[ .,/-]+[A-Z]{2}[ .,/-]+)\b/i, uniqConcat(value("spanish")), { skipFromTitle: true, skipIfAlreadyFound: false }); + parser.addHandler("languages", /\bspanish\W+subs?\b/i, uniqConcat(value("spanish")), { skipIfAlreadyFound: false }); parser.addHandler("languages", /\b(spanish|espanhol)\b/i, uniqConcat(value("spanish")), { skipIfFirst: true, skipIfAlreadyFound: false }); parser.addHandler("languages", /\b(?:p[rt]|en|port)[. (\\/-]*BR\b/i, uniqConcat(value("portuguese")), { skipIfAlreadyFound: false, remove: true }); parser.addHandler("languages", /\b(?:leg(?:endado|endas?)?|dub(?:lado)?|portugu[eèê]se?)[. -]*BR\b/i, uniqConcat(value("portuguese")), { skipIfAlreadyFound: false }); diff --git a/test/language.js b/test/language.js index 0f2b305..44534e0 100644 --- a/test/language.js +++ b/test/language.js @@ -170,6 +170,12 @@ describe("Parsing language", () => { expect(parse(releaseName)).to.deep.include({ languages: ["spanish"] }); }); + it("10_Spanish-Subs.srt", () => { + const releaseName = "10_Spanish-Subs.srt"; + + expect(parse(releaseName)).to.deep.include({ languages: ["spanish"] }); + }); + it("Patriot Games [1992] Eng, Ger, Cze, Hun, Pol + multisub DVDrip", () => { const releaseName = "Patriot Games [1992] Eng, Ger, Cze, Hun, Pol + multisub DVDrip";