Improved 1080p / anamorphic switch
This commit is contained in:
parent
14a0e29c92
commit
cafc711fa6
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name AnimeBytes Mediainfo Improvements
|
||||
// @author WeebDataHoarder
|
||||
// @version 1.26.1
|
||||
// @version 1.26.2
|
||||
// @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
|
||||
|
@ -413,7 +413,7 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou
|
|||
if(params.length === 2){
|
||||
let dar = params[0] / params[1];
|
||||
|
||||
if(Math.abs(ar - dar) >= 0.001){
|
||||
if(Math.abs(ar - dar) >= 0.02){
|
||||
warnings.video.push(["info", "Anamorphic video found: " + width + "x" + height + " -> "+ Math.floor(height * dar) + "x" + height]);
|
||||
width = Math.floor(height * dar);
|
||||
}
|
||||
|
@ -463,12 +463,12 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou
|
|||
name: "720" + scanTypeLetter,
|
||||
legacy: "720p"/* + ((scanTypeLetter !== "p" && scanTypeLetter !== "i") ? "i" : scanTypeLetter)*/
|
||||
};
|
||||
}else if(width <= 1920 && width >= 1820 && height > 720 && height <= 1084){
|
||||
}else if(width <= 1940 && width >= 1820 && height > 720 && height <= 1084){
|
||||
tags.resolution = {
|
||||
name: "1080" + scanTypeLetter,
|
||||
legacy: "1080" + ((scanTypeLetter !== "p" && scanTypeLetter !== "i") ? "i" : scanTypeLetter)
|
||||
};
|
||||
}else if(width <= 3840 && width >= 3640 && height > 1084 && height <= 2160){
|
||||
}else if(width <= 3850 && width >= 3640 && height > 1084 && height <= 2160){
|
||||
tags.resolution = "4K";
|
||||
}else{
|
||||
tags.resolution = width + "x" + height;
|
||||
|
|
Loading…
Reference in a new issue