Fix ffmpeg bug (doesn't move image streams) (#282)

make-only-subtitle-default
HaveAGitGat 4 years ago committed by GitHub
parent 82d2326fd0
commit e4d0ea0207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -111,9 +111,16 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
const matchedStreams = []; const matchedStreams = [];
for (let j = 0; j < streams.length; j += 1) { for (let j = 0; j < streams.length; j += 1) {
if (String(sortType.getValue(streams[j])).includes(String(items[i]))) { if (String(sortType.getValue(streams[j])).includes(String(items[i]))) {
matchedStreams.push(streams[j]); if (
streams.splice(j, 1); streams[j].codec_long_name
j -= 1; && 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); streams = matchedStreams.concat(streams);

Loading…
Cancel
Save