mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-17 11:16:26 -07:00
Only process if properties are available
This commit is contained in:
parent
29d1f7e836
commit
1931ff9afb
1 changed files with 81 additions and 77 deletions
|
|
@ -38,6 +38,9 @@ module.exports.plugin = function plugin(file, librarySettings, inputs) {
|
||||||
_Other: 'Other'
|
_Other: 'Other'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//only process if properties available
|
||||||
|
if (file.ffProbeData.streams[0].codec_name && file.video_resolution) {
|
||||||
|
|
||||||
let resolution = '_' + file.video_resolution
|
let resolution = '_' + file.video_resolution
|
||||||
let resShouldBe = resolutions[resolution]
|
let resShouldBe = resolutions[resolution]
|
||||||
let codecShouldBe = file.ffProbeData.streams[0].codec_name
|
let codecShouldBe = file.ffProbeData.streams[0].codec_name
|
||||||
|
|
@ -129,6 +132,7 @@ module.exports.plugin = function plugin(file, librarySettings, inputs) {
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue