mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
improve fallback ep matcher
This commit is contained in:
@@ -43,7 +43,7 @@ function parseSeriesVideo(video, parsedTorrentName) {
|
|||||||
// force episode to any found number if it was not parsed
|
// force episode to any found number if it was not parsed
|
||||||
if (!videoInfo.episodes && !videoInfo.date) {
|
if (!videoInfo.episodes && !videoInfo.date) {
|
||||||
const epMatcher = videoInfo.title.match(
|
const epMatcher = videoInfo.title.match(
|
||||||
/(?<!season\W*|disk\W*|movie\W*|film\W*)(?:^|\W)(\d{1,4})(?:a|b|c|v\d)?(?:\W|$)(?!disk|movie|film)/i);
|
/(?<!season\W*|disk\W*|movie\W*|film\W*)(?:^|\W|_)(\d{1,4})(?:a|b|c|v\d)?(?:_|\W|$)(?!disk|movie|film)/i);
|
||||||
videoInfo.episodes = epMatcher && [parseInt(epMatcher[1], 10)];
|
videoInfo.episodes = epMatcher && [parseInt(epMatcher[1], 10)];
|
||||||
videoInfo.episode = videoInfo.episodes && videoInfo.episodes[0];
|
videoInfo.episode = videoInfo.episodes && videoInfo.episodes[0];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user