From 20cdd146afbc52e58d0d9903481f8c6aa3e86416 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Wed, 25 Sep 2019 06:21:59 +0100 Subject: [PATCH] update --- ...ugin_a37x_Drawmonster_MP4_No_Title_Meta.js | 83 +++++++++++++++++++ ...r_Plugin_nc7x_Drawmonster_No_Title_Meta.js | 83 +++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 Community/Tdarr_Plugin_a37x_Drawmonster_MP4_No_Title_Meta.js create mode 100644 Community/Tdarr_Plugin_nc7x_Drawmonster_No_Title_Meta.js diff --git a/Community/Tdarr_Plugin_a37x_Drawmonster_MP4_No_Title_Meta.js b/Community/Tdarr_Plugin_a37x_Drawmonster_MP4_No_Title_Meta.js new file mode 100644 index 0000000..4cfc6a4 --- /dev/null +++ b/Community/Tdarr_Plugin_a37x_Drawmonster_MP4_No_Title_Meta.js @@ -0,0 +1,83 @@ + + + +function details() { + + return { + id: "Tdarr_Plugin_a37x_Drawmonster_MP4_No_Title_Meta", + Name: "Drawmonster MP4 No title meta data ", + Type: "Video", + Description: `This plugin removes metadata (if a title exists). The output container is mp4. \n\n +`, + Version: "1.00", + Link: "https://github.com/HaveAGitGat/Tdarr_Plugin_a37x_Drawmonster_MP4_No_Title_Meta" + } + +} + +function plugin(file) { + + + //Must return this object + + var response = { + + processFile : false, + preset : '', + container : '.mp4', + handBrakeMode : false, + FFmpegMode : false, + reQueueAfter : false, + infoLog : '', + + } + + + response.FFmpegMode = true + + + + + if (file.fileMedium !== "video") { + + + console.log("File is not video") + + response.infoLog += " File is not video" + response.processFile = false; + + return response + + } else { + + var jsonString = JSON.stringify(file) + + + + + + /// + + + /// + if(file.meta.Title != undefined ){ + + response.infoLog += " File has title metadata" + response.preset = ',-map_metadata -1 -c:v copy -c:a copy' + response.reQueueAfter = true; + response.processFile = true; + return response + }else{ + response.infoLog += " File has no title metadata" + } + + + response.infoLog += " File meets conditions!" + return response + + } +} + +module.exports.details = details; + +module.exports.plugin = plugin; \ No newline at end of file diff --git a/Community/Tdarr_Plugin_nc7x_Drawmonster_No_Title_Meta.js b/Community/Tdarr_Plugin_nc7x_Drawmonster_No_Title_Meta.js new file mode 100644 index 0000000..b84acd4 --- /dev/null +++ b/Community/Tdarr_Plugin_nc7x_Drawmonster_No_Title_Meta.js @@ -0,0 +1,83 @@ + + + +function details() { + + return { + id: "Tdarr_Plugin_nc7x_Drawmonster_No_Title_Meta", + Name: "Drawmonster No title meta data ", + Type: "Video", + Description: `This plugin removes metadata (if a title exists). The output container is the same as the original. \n\n +`, + Version: "1.00", + Link: "https://github.com/HaveAGitGat/Tdarr_Plugin_a37x_Drawmonster_MP4_No_Title_Meta" + } + +} + +function plugin(file) { + + + //Must return this object + + var response = { + + processFile : false, + preset : '', + container : '.mp4', + handBrakeMode : false, + FFmpegMode : false, + reQueueAfter : false, + infoLog : '', + + } + + response.container = '.'+file.container + response.FFmpegMode = true + + + + + if (file.fileMedium !== "video") { + + + console.log("File is not video") + + response.infoLog += " File is not video" + response.processFile = false; + + return response + + } else { + + var jsonString = JSON.stringify(file) + + + + + + /// + + + /// + if(file.meta.Title != undefined ){ + + response.infoLog += " File has title metadata" + response.preset = ',-map_metadata -1 -c:v copy -c:a copy' + response.reQueueAfter = true; + response.processFile = true; + return response + }else{ + response.infoLog += " File has no title metadata" + } + + + response.infoLog += " File meets conditions!" + return response + + } +} + +module.exports.details = details; + +module.exports.plugin = plugin; \ No newline at end of file