mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Catch lowercase bug
This commit is contained in:
parent
c3f33ff180
commit
b265e586e8
2 changed files with 14 additions and 2 deletions
|
|
@ -249,7 +249,13 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
// Go through each stream in the file.
|
||||
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
|
||||
// Check if stream is a video.
|
||||
if (file.ffProbeData.streams[i].codec_type.toLowerCase() === 'video') {
|
||||
let codec_type = '';
|
||||
try {
|
||||
codec_type = file.ffProbeData.streams[i].codec_type.toLowerCase();
|
||||
} catch (err) {
|
||||
// err
|
||||
}
|
||||
if (codec_type === 'video') {
|
||||
// Check if codec of stream is mjpeg/png, if so then remove this "video" stream.
|
||||
// mjpeg/png are usually embedded pictures that can cause havoc with plugins.
|
||||
if (file.ffProbeData.streams[i].codec_name === 'mjpeg' || file.ffProbeData.streams[i].codec_name === 'png') {
|
||||
|
|
|
|||
|
|
@ -216,7 +216,13 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
// Go through each stream in the file.
|
||||
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
|
||||
// Check if stream is a video.
|
||||
if (file.ffProbeData.streams[i].codec_type.toLowerCase() === 'video') {
|
||||
let codec_type = '';
|
||||
try {
|
||||
codec_type = file.ffProbeData.streams[i].codec_type.toLowerCase();
|
||||
} catch (err) {
|
||||
// err
|
||||
}
|
||||
if (codec_type === 'video') {
|
||||
// Check if codec of stream is mjpeg/png.
|
||||
// If so then remove this "video" stream.
|
||||
// mjpeg/png are usually embedded pictures that can cause havoc with plugins.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue