mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-10 07:50:29 -07:00
feat: update error message when no stream data
This commit is contained in:
parent
41ec36673b
commit
0f82b5826f
2 changed files with 21 additions and 2 deletions
|
|
@ -39,10 +39,20 @@ const plugin = (args:IpluginInputArgs):IpluginOutputArgs => {
|
|||
|
||||
const container = getContainer(args.inputFileObj._id);
|
||||
|
||||
let streams = [];
|
||||
|
||||
try {
|
||||
streams = JSON.parse(JSON.stringify(args.inputFileObj.ffProbeData.streams));
|
||||
} catch (err) {
|
||||
const message = `Error parsing FFprobe streams, it seems FFprobe could not scan the file: ${JSON.stringify(err)}`;
|
||||
args.jobLog(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const ffmpegCommand = {
|
||||
init: true,
|
||||
inputFiles: [],
|
||||
streams: JSON.parse(JSON.stringify(args.inputFileObj.ffProbeData.streams)).map((stream:Istreams) => ({
|
||||
streams: streams.map((stream:Istreams) => ({
|
||||
...stream,
|
||||
removed: false,
|
||||
mapArgs: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue