Bumped mediainfo version to get proper audio channel count
This commit is contained in:
parent
cafc711fa6
commit
01b5ee77df
|
@ -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==
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue