Specifically set remux = false on known rips by file name

This commit is contained in:
DataHoarder 2023-04-13 11:37:58 +02:00
parent 6ec0ccf385
commit b9129311af
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name AnimeBytes Mediainfo Improvements
// @author WeebDataHoarder
// @version 1.30.2
// @version 1.30.3
// @downloadURL https://git.gammaspectra.live/WeebDataHoarder/userscripts/raw/branch/master/AnimeBytes/ab-mediainfo.user.js
// @updateURL https://git.gammaspectra.live/WeebDataHoarder/userscripts/raw/branch/master/AnimeBytes/ab-mediainfo.user.js
// @description AnimeBytes Mediainfo Improvements. Adds several listing and matching releases against mediainfo utilities. MIT license
@ -297,6 +297,13 @@ function extractTagsFromFilename(fileName, sourceTags, source = ""){
}else if(p.match(/^web(-?(rip|dl))?$/i) !== null){
tags.source = "Web";
}
// negative match known rips to not be flagged by REMUX* later
if(p.match(/^(bd|(blu-?ray))(-?rip)$/i) !== null){
tags.remux = false;
} else if(p.match(/^(dvd)(-?rip)$/i) !== null){
tags.remux = false;
}
});
fileName.split(/[ _\[(\])]/).forEach((p) => {
@ -382,6 +389,13 @@ function extractTagsFromFilename(fileName, sourceTags, source = ""){
}else if(p.match(/^web(-?(rip|dl))?$/i) !== null){
tags.source = "Web";
}
// negative match known rips to not be flagged by REMUX* later
if(p.match(/^(bd|(blu-?ray))(-?rip)$/i) !== null){
tags.remux = false;
} else if(p.match(/^(dvd)(-?rip)$/i) !== null){
tags.remux = false;
}
});
return tags;