From 92dc02159b9ef9ac8f7a7878d04286695e4897f8 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:02:28 +0200 Subject: [PATCH] Added video codec match for DIVX3, DIVX4, RealVideo*, SNOW, Dirac; and for audio for MP1, RealAudio* --- AnimeBytes/ab-mediainfo.user.js | 7 +- AnimeBytes/deps/mediainfo.js | 131 +++++++++++++++++++++++++++++++- 2 files changed, 132 insertions(+), 6 deletions(-) diff --git a/AnimeBytes/ab-mediainfo.user.js b/AnimeBytes/ab-mediainfo.user.js index b9b210c..d613af4 100644 --- a/AnimeBytes/ab-mediainfo.user.js +++ b/AnimeBytes/ab-mediainfo.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name AnimeBytes Mediainfo Improvements // @author WeebDataHoarder -// @version 1.28.2 +// @version 1.28.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?2 // @require deps/settings.js?1 -// @require deps/mediainfo.js?10 +// @require deps/mediainfo.js?11 // @require deps/ab-class.js?1 // @run-at document-end // ==/UserScript== @@ -409,6 +409,9 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou case "AVI": tags.container = "AVI"; break; + case "RealMedia": + tags.container = "RMVB"; + break; case "Windows Media": tags.container = "WMV"; break; diff --git a/AnimeBytes/deps/mediainfo.js b/AnimeBytes/deps/mediainfo.js index 610e065..57c6231 100644 --- a/AnimeBytes/deps/mediainfo.js +++ b/AnimeBytes/deps/mediainfo.js @@ -125,6 +125,23 @@ class Mediainfo { open: true }, + { + name: "MP1", + match: { + codec_id: /^(MP1|A_MPEG\/L1)$/i + }, + legacy: "MP1" + }, + + { + name: "MP1", + match: { + format: "MPEG Audio", + format_profile: "Layer 1" + }, + legacy: "MP1" + }, + { name: "MP2", match: { @@ -197,6 +214,46 @@ class Mediainfo { open: true }, + { + name: "RealAudio 14.4", + match: { + codec_id: /^((A_)?REAL\/)?14_4/i + }, + legacy: "RealAudio" + }, + + { + name: "RealAudio 28.8", + match: { + codec_id: /^((A_)?REAL\/)?28_8/i + }, + legacy: "RealAudio" + }, + + { + name: "RealAudio ATRAC3", + match: { + codec_id: /^((A_)?REAL\/)?ATRC/i + }, + legacy: "RealAudio" + }, + + { + name: "RealAudio COOK", + match: { + codec_id: /^((A_)?REAL\/)?COOK/i + }, + legacy: "RealAudio" + }, + + { + name: "RealAudio SIPR", + match: { + codec_id: /^((A_)?REAL\/)?SIPR/i + }, + legacy: "RealAudio" + }, + { name: "WavPack", match: { @@ -441,9 +498,9 @@ class Mediainfo { }, { - name: "DivX 4", + name: "DivX 5", match: { - codec_id: /^(V_MS\/VFW\/FOURCC \/ )?DIVX/, + codec_id: /(^V_MPEG4\/ISO\/ASP|DX50)$/, }, legacy: "DivX" }, @@ -457,9 +514,25 @@ class Mediainfo { }, { - name: "DivX 5", + name: "DivX 4", match: { - codec_id: /(^V_MPEG4\/ISO\/ASP|DX50)$/, + codec_id: /^(V_MS\/VFW\/FOURCC \/ )?DIVX/, + }, + legacy: "DivX" + }, + + { + name: "DivX 4", + match: { + codec_id: /^V_MPEG4\/ISO\/SP$/, + }, + legacy: "DivX" + }, + + { + name: "DivX 3", + match: { + codec_id: /(^V_MPEG4\/MS\/V3|DIV3)$/, }, legacy: "DivX" }, @@ -480,6 +553,38 @@ class Mediainfo { legacy: "XviD" }, + { + name: "RealVideo 1", + match: { + codec_id: /^((V_)?REAL\/)?RV10/i + }, + legacy: "RealVideo" + }, + + { + name: "RealVideo G2", + match: { + codec_id: /^((V_)?REAL\/)?RV20/i + }, + legacy: "RealVideo" + }, + + { + name: "RealVideo 3", + match: { + codec_id: /^((V_)?REAL\/)?RV30/i + }, + legacy: "RealVideo" + }, + + { + name: "RealVideo 4", + match: { + codec_id: /^((V_)?REAL\/)?RV40/i + }, + legacy: "RealVideo" + }, + { name: "h264 $chroma", match: { @@ -520,6 +625,24 @@ class Mediainfo { legacy: "h264 $bitDepth-bit" }, + { + name: "Dirac", + match: { + codec_id: /^(V_)?DIRAC/i + }, + legacy: "Dirac", + open: true, + }, + + { + name: "Snow", + match: { + codec_id: /^(V_)?SNOW/i + }, + legacy: "Snow", + open: true, + }, + { name: "Theora", match: {