mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-16 18:45:53 -07:00
commit
821f706756
3 changed files with 11 additions and 11 deletions
|
|
@ -62,11 +62,6 @@ function plugin(file, librarySettings, inputs) {
|
||||||
response.container = "." + inputs.container;
|
response.container = "." + inputs.container;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams.
|
|
||||||
if (inputs.container == "mkv") {
|
|
||||||
extraArguments += "-map -0:d ";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if file is a video. If it isn't then exit plugin.
|
// Check if file is a video. If it isn't then exit plugin.
|
||||||
if (file.fileMedium !== "video") {
|
if (file.fileMedium !== "video") {
|
||||||
response.processFile = false;
|
response.processFile = false;
|
||||||
|
|
@ -111,6 +106,11 @@ function plugin(file, librarySettings, inputs) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams.
|
||||||
|
if (inputs.container == "mkv") {
|
||||||
|
extraArguments += `-map -0:d `;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if 10bit variable is true.
|
// Check if 10bit variable is true.
|
||||||
if (inputs.enable_10bit == "true") {
|
if (inputs.enable_10bit == "true") {
|
||||||
// If set to true then add 10bit argument
|
// If set to true then add 10bit argument
|
||||||
|
|
|
||||||
|
|
@ -62,11 +62,6 @@ function plugin(file, librarySettings, inputs) {
|
||||||
response.container = "." + inputs.container;
|
response.container = "." + inputs.container;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams.
|
|
||||||
if (inputs.container == "mkv") {
|
|
||||||
extraArguments += "-map -0:d ";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if file is a video. If it isn't then exit plugin.
|
// Check if file is a video. If it isn't then exit plugin.
|
||||||
if (file.fileMedium !== "video") {
|
if (file.fileMedium !== "video") {
|
||||||
response.processFile = false;
|
response.processFile = false;
|
||||||
|
|
@ -111,6 +106,11 @@ function plugin(file, librarySettings, inputs) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams.
|
||||||
|
if (inputs.container == "mkv") {
|
||||||
|
extraArguments += `-map -0:d `;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if 10bit variable is true.
|
// Check if 10bit variable is true.
|
||||||
if (inputs.enable_10bit == "true") {
|
if (inputs.enable_10bit == "true") {
|
||||||
// If set to true then add 10bit argument
|
// If set to true then add 10bit argument
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ function plugin(file, librarySettings, inputs) {
|
||||||
file.ffProbeData.streams[i].tags.title.toLowerCase().includes("sdh"))
|
file.ffProbeData.streams[i].tags.title.toLowerCase().includes("sdh"))
|
||||||
) {
|
) {
|
||||||
ffmpegCommandInsert += `-map -0:s:${subtitleIdx} `;
|
ffmpegCommandInsert += `-map -0:s:${subtitleIdx} `;
|
||||||
response.infoLog += `☒Subtitle stream detected as being Commentary or Description, removing. Subtitle stream 0:s:${SubtitleIdx} - ${file.ffProbeData.streams[i].tags.title}. \n`;
|
response.infoLog += `☒Subtitle stream detected as being Commentary or Description, removing. Subtitle stream 0:s:${subtitleIdx} - ${file.ffProbeData.streams[i].tags.title}. \n`;
|
||||||
convert = true;
|
convert = true;
|
||||||
}
|
}
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue