Fix match without groups, added libaom matching
This commit is contained in:
parent
3217793224
commit
fc1c57b5e0
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name AnimeBytes Mediainfo Improvements
|
||||
// @author WeebDataHoarder
|
||||
// @version 1.8.0
|
||||
// @version 1.8.1
|
||||
// @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
|
||||
|
@ -820,13 +820,15 @@ if(allowedVideoTypes.indexOf(torrentType.replace("Live Action ", "")) !== -1){
|
|||
break;
|
||||
}
|
||||
|
||||
for(const [k, v] of Object.entries(m.groups)){
|
||||
if(typeof v !== "undefined"){
|
||||
n = n.replace('$' + k, v);
|
||||
l = l.replace('$' + k, v);
|
||||
}else{
|
||||
n = n.replace('$' + k, "");
|
||||
l = l.replace('$' + k, "");
|
||||
if("groups" in m){
|
||||
for(const [k, v] of Object.entries(m.groups)){
|
||||
if(typeof v !== "undefined"){
|
||||
n = n.replace('$' + k, v);
|
||||
l = l.replace('$' + k, v);
|
||||
}else{
|
||||
n = n.replace('$' + k, "");
|
||||
l = l.replace('$' + k, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if (video[key] !== value){
|
||||
|
@ -894,6 +896,8 @@ if(allowedVideoTypes.indexOf(torrentType.replace("Live Action ", "")) !== -1){
|
|||
if(versionMatch !== null){
|
||||
tags.videoEncoderVersion = parseInt(versionMatch.groups.version);
|
||||
}
|
||||
}else if(video.writing_library.match(/libaom/) !== null){
|
||||
tags.videoEncoder = "libaom";
|
||||
}else if(video.writing_library.match(/_nvenc/) !== null){
|
||||
tags.videoEncoder = "NVENC";
|
||||
warnings.video.push(["danger", "Found NVENC hardware-encoded stream"]);
|
||||
|
@ -1032,13 +1036,15 @@ if(allowedVideoTypes.indexOf(torrentType.replace("Live Action ", "")) !== -1){
|
|||
break;
|
||||
}
|
||||
|
||||
for(const [k, v] of Object.entries(m.groups)){
|
||||
if(typeof v !== "undefined"){
|
||||
n = n.replace('$' + k, v);
|
||||
l = l.replace('$' + k, v);
|
||||
}else{
|
||||
n = n.replace('$' + k, "");
|
||||
l = l.replace('$' + k, "");
|
||||
if("groups" in m){
|
||||
for(const [k, v] of Object.entries(m.groups)){
|
||||
if(typeof v !== "undefined"){
|
||||
n = n.replace('$' + k, v);
|
||||
l = l.replace('$' + k, v);
|
||||
}else{
|
||||
n = n.replace('$' + k, "");
|
||||
l = l.replace('$' + k, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if (!(value instanceof RegExp) && audio[key] !== value){
|
||||
|
|
Loading…
Reference in a new issue