mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Fix ffmpeg bug (doesn't move image streams) (#282)
This commit is contained in:
parent
82d2326fd0
commit
e4d0ea0207
1 changed files with 10 additions and 3 deletions
|
|
@ -111,9 +111,16 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
const matchedStreams = [];
|
||||
for (let j = 0; j < streams.length; j += 1) {
|
||||
if (String(sortType.getValue(streams[j])).includes(String(items[i]))) {
|
||||
matchedStreams.push(streams[j]);
|
||||
streams.splice(j, 1);
|
||||
j -= 1;
|
||||
if (
|
||||
streams[j].codec_long_name
|
||||
&& streams[j].codec_long_name.includes('image')
|
||||
) {
|
||||
// do nothing, ffmpeg bug, doesn't move image streams
|
||||
} else {
|
||||
matchedStreams.push(streams[j]);
|
||||
streams.splice(j, 1);
|
||||
j -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
streams = matchedStreams.concat(streams);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue