mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-17 11:16:26 -07:00
Add dropdown to default plugins
This commit is contained in:
parent
844b856c5d
commit
b3e47f9bf8
2 changed files with 40 additions and 20 deletions
|
|
@ -46,10 +46,14 @@ const details = () => ({
|
|||
},
|
||||
{
|
||||
name: 'enable_10bit',
|
||||
type: 'string',
|
||||
defaultValue: 'false',
|
||||
type: 'boolean',
|
||||
defaultValue: false,
|
||||
inputUI: {
|
||||
type: 'text',
|
||||
type: 'dropdown',
|
||||
options: [
|
||||
'false',
|
||||
'true',
|
||||
],
|
||||
},
|
||||
tooltip: `Specify if output file should be 10bit. Default is false.
|
||||
\\nExample:\\n
|
||||
|
|
@ -60,10 +64,14 @@ const details = () => ({
|
|||
},
|
||||
{
|
||||
name: 'force_conform',
|
||||
type: 'string',
|
||||
defaultValue: 'false',
|
||||
type: 'boolean',
|
||||
defaultValue: false,
|
||||
inputUI: {
|
||||
type: 'text',
|
||||
type: 'dropdown',
|
||||
options: [
|
||||
'false',
|
||||
'true',
|
||||
],
|
||||
},
|
||||
tooltip: `Make the file conform to output containers requirements.
|
||||
\\n Drop hdmv_pgs_subtitle/eia_608/subrip/timed_id3 for MP4.
|
||||
|
|
@ -157,7 +165,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
|
||||
// Check if force_conform option is checked.
|
||||
// If so then check streams and add any extra parameters required to make file conform with output format.
|
||||
if (inputs.force_conform === 'true') {
|
||||
if (inputs.force_conform === true) {
|
||||
if (inputs.container.toLowerCase() === 'mkv') {
|
||||
extraArguments += '-map -0:d ';
|
||||
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
|
||||
|
|
@ -200,7 +208,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
}
|
||||
|
||||
// Check if 10bit variable is true.
|
||||
if (inputs.enable_10bit === 'true') {
|
||||
if (inputs.enable_10bit === true) {
|
||||
// If set to true then add 10bit argument
|
||||
extraArguments += '-pix_fmt p010le ';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue