Skip to content

Tdarr_Plugin_henk_Keep_Native_Lang_Plus_Eng.js applies inconsistent spacing on params #754

@Routhinator

Description

@Routhinator

Describe the bug
Spaces are inconsistently applied across the options in this plugin.

The start of the params is set with a space at the end:

preset: ', -map 0 ',

Then the -map params are set with a space at the end:

response.preset += `-map -0:a:${streamIndex} `;

Then the -c copy param is set with a space at the front:

response.preset += ' -c copy -max_muxing_queue_size 9999';

If it needs to remove multiple streams, the next stream is added with no space in front to the -c copy command, resulting in:

 -map 0 -map -0:a:1 -c copy -max_muxing_queue_size 9999-map -0:a:1 -c copy -max_muxing_queue_size 9999

To Reproduce
Run against a file that removes multiple streams.

Expected behavior
Spaces are consistently applied by the plugin.

Please provide the following information:

  • Config files : Does not appear to be config related, but rather programming logic related.

  • Job reports: :

2025-01-24T06:55:13.266Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:Running /usr/bin/ffmpeg -i <input-file> -map 0 -map -0:a:1 -c copy -max_muxing_queue_size 9999-map -0:a:1 -c copy -max_muxing_queue_size 9999 <output-file>
2025-01-24T06:55:13.266Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:ffmpeg version 5.1.6-0+deb12u1 Copyright (c) 2000-2024 the FFmpeg developers
2025-01-24T06:55:13.266Z built with gcc 12 (Debian 12.2.0-14)
2025-01-24T06:55:13.266Z configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
2025-01-24T06:55:13.266Z libavutil 57. 28.100 / 57. 28.100
2025-01-24T06:55:13.266Z libavcodec 59. 37.100 / 59. 37.100
2025-01-24T06:55:13.266Z libavformat 59. 27.100 / 59. 27.100
2025-01-24T06:55:13.266Z libavdevice 59. 7.100 / 59. 7.100
2025-01-24T06:55:13.266Z libavfilter 8. 44.100 / 8. 44.100
2025-01-24T06:55:13.266Z libswscale 6. 7.100 / 6. 7.100
2025-01-24T06:55:13.266Z libswresample 4. 7.100 / 4. 7.100
2025-01-24T06:55:13.266Z libpostproc 56. 6.100 / 56. 6.100
2025-01-24T06:55:13.266Z
2025-01-24T06:55:13.266Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:Unrecognized option '0:a:1'.
2025-01-24T06:55:13.266Z Error splitting the argument list: Option not found
2025-01-24T06:55:13.266Z
2025-01-24T06:55:13.266Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:CLI error code: 1
2025-01-24T06:55:13.267Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:CLI /usr/bin/ffmpeg exited with code: 1
2025-01-24T06:55:13.267Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:Running /usr/bin/ffmpeg failed
2025-01-24T06:55:13.267Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:Error: Running /usr/bin/ffmpeg failed
2025-01-24T06:55:13.267Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:"Running /usr/bin/ffmpeg failed"
2025-01-24T06:55:13.267Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:"Error: Running /usr/bin/ffmpeg failed\n at /config/tdarr/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/classic/runClassicTranscodePlugin/2.0.0/index.js:232:27\n at step (/config/tdarr/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/classic/runClassicTranscodePlugin/2.0.0/index.js:33:23)\n at Object.next (/config/tdarr/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/classic/runClassicTranscodePlugin/2.0.0/index.js:14:53)\n at fulfilled (/config/tdarr/Tdarr_Node/assets/app/plugins/FlowPlugins/CommunityFlowPlugins/classic/runClassicTranscodePlugin/2.0.0/index.js:5:58)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
2025-01-24T06:55:13.267Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:[-error-]
2025-01-24T06:55:13.267Z p4FPncp3V:Node[zesty-zebu]:Worker[taut-tench]:Flow has failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions