mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-13 09:20:27 -07:00
Use file.ffProbeData.format.duration
This commit is contained in:
parent
70471aa78c
commit
f8e58f594c
2 changed files with 35 additions and 1 deletions
|
|
@ -88,7 +88,13 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
let duration = '';
|
||||
|
||||
// Get duration of stream 0 and times it by 0.0166667 to get time in minutes
|
||||
duration = file.ffProbeData.streams[0].duration * 0.0166667;
|
||||
if (file.ffProbeData.streams[0].duration) {
|
||||
duration = file.ffProbeData.streams[0].duration;
|
||||
} else {
|
||||
duration = file.ffProbeData.format.duration;
|
||||
}
|
||||
|
||||
duration *= 0.0166667;
|
||||
|
||||
// Set up required variables.
|
||||
let videoIdx = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue