Add error if all streams removed

make-only-subtitle-default
HaveAGitGat 2 years ago
parent 151cc32319
commit 1f66d1ed8a

@ -118,6 +118,10 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
}
return !stream.removed;
});
if (streams.length === 0) {
args.jobLog('All streams have been removed from the file');
throw new Error('All streams have been removed from the file');
}
_loop_1 = function (i) {
var stream = streams[i];
stream.outputArgs = stream.outputArgs.map(function (arg) {

@ -91,6 +91,11 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
return !stream.removed;
});
if (streams.length === 0) {
args.jobLog('All streams have been removed from the file');
throw new Error('All streams have been removed from the file');
}
for (let i = 0; i < streams.length; i += 1) {
const stream = streams[i];

Loading…
Cancel
Save