[scraper] improve detection of movies in 2 cds

This commit is contained in:
TheBeastLT
2021-02-24 11:49:25 +01:00
parent 7193b8a75b
commit 622e4d7274
3 changed files with 5 additions and 5 deletions

4
package-lock.json generated
View File

@@ -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"
}

View File

@@ -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",

View File

@@ -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) {