Bumped mediainfo version to get proper audio channel count

This commit is contained in:
DataHoarder 2022-04-04 17:01:48 +02:00
parent cafc711fa6
commit 01b5ee77df
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name AnimeBytes Mediainfo Improvements
// @author WeebDataHoarder
// @version 1.26.2
// @version 1.26.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
@ -17,7 +17,7 @@
// @require deps/compat.js?1
// @require deps/resources.js?1
// @require deps/settings.js?1
// @require deps/mediainfo.js?9
// @require deps/mediainfo.js?10
// @require deps/ab-class.js?1
// @run-at document-end
// ==/UserScript==

View file

@ -693,7 +693,7 @@ class Mediainfo {
}
static makeAudioObject(ob){
const channels = parseInt(("channels" in ob ? ob.channels : ("channel_count" in ob ? ob.channel_count : "1 channel")).match(/(?<channels>[0-9]+) channels?$/).groups.channels);
const channels = parseInt(("channels" in ob ? ob.channels : ("channel_count" in ob ? ob.channel_count : "1 channel")).match(/(?<channels>[0-9]+) channels?[\s]*(\/|$)/).groups.channels);
const codec_id = ("codec_id" in ob && ob.codec_id.match(/^[0-9]+$/) === null) ? ob.codec_id : ("codec_id_hint" in ob ? ob.codec_id_hint : ob.format);
ob.channels = channels;