From 622e4d727486b2570dea37fc9477144d22006042 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Wed, 24 Feb 2021 11:49:25 +0100 Subject: [PATCH] [scraper] improve detection of movies in 2 cds --- package-lock.json | 4 ++-- package.json | 2 +- scraper/lib/torrentFiles.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d15f260..d1f2c2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1870,8 +1870,8 @@ } }, "parse-torrent-title": { - "version": "git://github.com/TheBeastLT/parse-torrent-title.git#354953afa5108954c87d76c8985f0bb97dcb2499", - "from": "git://github.com/TheBeastLT/parse-torrent-title.git#354953afa5108954c87d76c8985f0bb97dcb2499", + "version": "git://github.com/TheBeastLT/parse-torrent-title.git#07641d3631a2cf684f9a8cbbb4114e22c75915f8", + "from": "git://github.com/TheBeastLT/parse-torrent-title.git#07641d3631a2cf684f9a8cbbb4114e22c75915f8", "requires": { "moment": "^2.24.0" } diff --git a/package.json b/package.json index 70b0efe..db07ddf 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "nodejs-bing": "^0.1.0", "nyaapi": "^2.3.3", "parse-torrent": "^6.1.2", - "parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#354953afa5108954c87d76c8985f0bb97dcb2499", + "parse-torrent-title": "git://github.com/TheBeastLT/parse-torrent-title.git#07641d3631a2cf684f9a8cbbb4114e22c75915f8", "pg": "^7.8.2", "pg-hstore": "^2.3.2", "real-debrid-api": "git://github.com/TheBeastLT/node-real-debrid.git#935a5c23ae809edbcd2a111526a7f74d6767c50d", diff --git a/scraper/lib/torrentFiles.js b/scraper/lib/torrentFiles.js index 69a982e..4b54644 100644 --- a/scraper/lib/torrentFiles.js +++ b/scraper/lib/torrentFiles.js @@ -477,8 +477,8 @@ function isDiskTorrent(contents) { function isSingleMovie(videos) { return videos.length === 1 || (videos.length === 2 && - videos.find(v => /\bcd[ .-]?0?1\b/i.test(v.path)) && - videos.find(v => /\bcd[ .-]?0?2\b/i.test(v.path))); + videos.find(v => /\b(?:part|disc|cd)[ ._-]?0?1\b|^0?1\.\w{2,4}$/i.test(v.path)) && + videos.find(v => /\b(?:part|disc|cd)[ ._-]?0?2\b|^0?2\.\w{2,4}$/i.test(v.path))); } function isFeaturette(video) {