From 57a92c5a51050333ddd849fddbc7f42d95000547 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Sat, 2 Sep 2023 15:58:32 +0200 Subject: [PATCH] Detect HandBrake encodes --- AnimeBytes/ab-mediainfo.user.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/AnimeBytes/ab-mediainfo.user.js b/AnimeBytes/ab-mediainfo.user.js index b3c4388..618111f 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.30.6 +// @version 1.31.0 // @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 @@ -1127,6 +1127,16 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou } }); + if ("general" in mediainfo) { + if("writing_application" in mediainfo.general){ + if(mediainfo.general.writing_application.match(/^HandBrake /) !== null){ + if(settings.getSetting("warning_handbrakeEncoder")){ + warnings.general.push(["info", "Found HandBrake encoder"]); + } + } + } + } + return tags; } @@ -1646,6 +1656,7 @@ settings.addSetting("warning_mediainfoInvalid", "General: Mediainfo not found", settings.addSetting("warning_tagMismatch", "General: Mismatched Tags", "Alert when site tags differ from calculated tags", "bool", true); settings.addSetting("warning_orderedChapters", "General: Ordered Chapters", "Warn when Ordered Chapters are found", "bool", true); settings.addSetting("warning_japaneseNumbering", "General: Japanese Episode Numbering", "Inform when episodes are labeled in Japanese. Example: 第02話", "bool", true); +settings.addSetting("warning_handbrakeEncoder", "General: HandBrake Encode", "Inform when HandBrake is found on a release.", "bool", true); settings.addSetting("warning_hwEncoder", "Video: Hardware Encoded", "Alert when a hardware encoder is found on a release.", "bool", true); settings.addSetting("warning_encodeProfile", "Video: Low Profile", "Warn when low encoding profile is found on encode settings.", "bool", true); settings.addSetting("warning_encodeSettings", "Video: Settings Information", "Show extra information messages about encode settings.", "bool", true);