Fix bitrate with periods
This commit is contained in:
parent
abe9e5d90f
commit
dc1737f520
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name AnimeBytes Mediainfo Improvements
|
||||
// @author WeebDataHoarder
|
||||
// @version 1.22.1
|
||||
// @version 1.22.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
|
||||
|
@ -563,7 +563,7 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou
|
|||
if(video.encoding_settings.match(/rc=2pass/) !== null){
|
||||
tags.videoCRF = "2pass";
|
||||
}
|
||||
if((match = video.encoding_settings.match(/bitrate=(?<bitrate>[0-9]+)/)) !== null){
|
||||
if((match = video.encoding_settings.match(/bitrate=(?<bitrate>[0-9.]+)/)) !== null){
|
||||
tags.videoBitrate = parseInt(match.groups.bitrate);
|
||||
}
|
||||
if(!("remux" in tags) && video.codec_id === "V_MPEG4/ISO/AVC" && (match = video.format_profile.match(/(?<profile>(baseline|main)[ 0-9]*)@/i)) !== null){
|
||||
|
@ -701,7 +701,7 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou
|
|||
}
|
||||
}else{
|
||||
if("bit_rate" in audio){
|
||||
let bitRate = parseInt(audio.bit_rate.split("/")[0].replace(/[^0-9]/g, ""));
|
||||
let bitRate = parseInt(audio.bit_rate.split("/")[0].replace(/[^0-9.]/g, ""));
|
||||
tags.audioBitrate = bitRate + "k";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue