mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
options to use original container
This commit is contained in:
parent
d6922ec703
commit
0abbfb9186
4 changed files with 82 additions and 6 deletions
|
|
@ -19,14 +19,17 @@ const details = () => ({
|
|||
inputUI: {
|
||||
type: 'text',
|
||||
},
|
||||
tooltip: `Specify output container of file
|
||||
tooltip: `Specify output container of file. Use 'original' wihout qoutes to keep original container.
|
||||
\\n Ensure that all stream types you may have are supported by your chosen container.
|
||||
\\n mkv is recommended.
|
||||
\\nExample:\\n
|
||||
mkv
|
||||
|
||||
\\nExample:\\n
|
||||
mp4`,
|
||||
mp4
|
||||
|
||||
\\nExample:\\n
|
||||
original`,
|
||||
},
|
||||
{
|
||||
name: 'bitrate_cutoff',
|
||||
|
|
@ -128,7 +131,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
response.processFile = false;
|
||||
return response;
|
||||
}
|
||||
response.container = `.${inputs.container}`;
|
||||
|
||||
if (inputs.container === 'original') {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
inputs.container = `${file.container}`;
|
||||
response.container = `.${file.container}`;
|
||||
} else {
|
||||
response.container = `.${inputs.container}`;
|
||||
}
|
||||
|
||||
// Check if file is a video. If it isn't then exit plugin.
|
||||
if (file.fileMedium !== 'video') {
|
||||
|
|
|
|||
|
|
@ -18,14 +18,17 @@ const details = () => ({
|
|||
inputUI: {
|
||||
type: 'text',
|
||||
},
|
||||
tooltip: `Specify output container of file.
|
||||
tooltip: `Specify output container of file. Use 'original' wihout qoutes to keep original container.
|
||||
\\n Ensure that all stream types you may have are supported by your chosen container.
|
||||
\\n mkv is recommended.
|
||||
\\nExample:\\n
|
||||
mkv
|
||||
|
||||
\\nExample:\\n
|
||||
mp4`,
|
||||
mp4
|
||||
|
||||
\\nExample:\\n
|
||||
original`,
|
||||
},
|
||||
{
|
||||
name: 'bitrate_cutoff',
|
||||
|
|
@ -107,7 +110,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
response.processFile = false;
|
||||
return response;
|
||||
}
|
||||
response.container = `.${inputs.container}`;
|
||||
|
||||
if (inputs.container === 'original') {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
inputs.container = `${file.container}`;
|
||||
response.container = `.${file.container}`;
|
||||
} else {
|
||||
response.container = `.${inputs.container}`;
|
||||
}
|
||||
|
||||
// Check if file is a video. If it isn't then exit plugin.
|
||||
if (file.fileMedium !== 'video') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue