mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Fix error when stream has no codec_name
Sometimes a stream has no codec_name property and the plugin fails
This commit is contained in:
parent
0fed4e0ddc
commit
92d568b572
1 changed files with 1 additions and 1 deletions
|
|
@ -173,7 +173,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
// check if the file is already hevc
|
||||
// it will not be transcoded if true and the plugin will be stopped immediately
|
||||
for (let i = 0; i < file.ffProbeData.streams.length; i += 1) {
|
||||
if (file.ffProbeData.streams[i].codec_name.toLowerCase() === 'hevc') {
|
||||
if (file.ffProbeData.streams[i].codec_name && file.ffProbeData.streams[i].codec_name.toLowerCase() === 'hevc') {
|
||||
response.processFile = false;
|
||||
response.infoLog += '☑File is already in hevc! \n';
|
||||
return response;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue