mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Add error if all streams removed
This commit is contained in:
parent
151cc32319
commit
1f66d1ed8a
2 changed files with 9 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue