mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-14 01:36:08 -07:00
Update Tdarr_Plugin_x7ac_Remove_Closed_Captions.js
This commit is contained in:
parent
25b67c2cfa
commit
04b001baa7
1 changed files with 15 additions and 15 deletions
|
|
@ -1,16 +1,16 @@
|
||||||
function details() {
|
function details() {
|
||||||
return {
|
return {
|
||||||
id: "Tdarr_Plugin_x7ac_Remove_Closed_Captions",
|
id: 'Tdarr_Plugin_WS_Remove_Closed_Captions',
|
||||||
Stage: "Pre-processing",
|
Stage: 'Pre-processing',
|
||||||
Name: "Remove closed captions",
|
Name: 'Remove burned closed captions',
|
||||||
Type: "Video",
|
Type: 'Video',
|
||||||
Operation: "Remux",
|
Operation: 'Remux',
|
||||||
Description:
|
Description:
|
||||||
"[Contains built-in filter] If detected, closed captions (XDS,608,708) will be removed.",
|
'[Contains built-in filter] If detected, closed captions (XDS,608,708) will be removed. Derived from x7ac Closed Captions plugin.',
|
||||||
Version: "1.00",
|
Version: "1.00",
|
||||||
Link:
|
Link:
|
||||||
"https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_x7ac_Remove_Closed_Captions.js",
|
'https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/',
|
||||||
Tags: "pre-processing,ffmpeg,subtitle only",
|
Tags: 'pre-processing,ffmpeg,subtitle only',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -18,25 +18,25 @@ function plugin(file) {
|
||||||
const response = {
|
const response = {
|
||||||
processFile: false,
|
processFile: false,
|
||||||
preset: ',-map 0 -codec copy -bsf:v "filter_units=remove_types=6"',
|
preset: ',-map 0 -codec copy -bsf:v "filter_units=remove_types=6"',
|
||||||
container: "." + file.container,
|
container: '.' + file.container,
|
||||||
handBrakeMode: false,
|
handBrakeMode: false,
|
||||||
FFmpegMode: true,
|
FFmpegMode: true,
|
||||||
reQueueAfter: true,
|
reQueueAfter: true,
|
||||||
infoLog: "",
|
infoLog: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
if (file.fileMedium !== "video") {
|
if (file.fileMedium !== 'video') {
|
||||||
response.infoLog += "☒File is not video \n";
|
response.infoLog += '☒File is not video \n';
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check if Closed Captions are set at file level
|
// Check if Closed Captions are set at file level
|
||||||
if (file.hasClosedCaptions) {
|
if (file.hasClosedCaptions) {
|
||||||
response.processFile = true;
|
response.processFile = true;
|
||||||
response.infoLog += '☒This file has closed captions \n';
|
response.infoLog += '☒This file has closed captions \n';
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
//If not, check for Closed Captions in the streams
|
// If not, check for Closed Captions in the streams
|
||||||
for (const stream in file.ffProbeData.streams) {
|
for (const stream in file.ffProbeData.streams) {
|
||||||
if (stream.closed_captions) {
|
if (stream.closed_captions) {
|
||||||
response.processFile = true;
|
response.processFile = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue