mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-10 16:00:28 -07:00
commit
71ca75fa52
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.
|
// Go through each stream in the file.
|
||||||
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
|
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
|
||||||
// Check if stream is a video.
|
// 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.
|
// 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.
|
// 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') {
|
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.
|
// Go through each stream in the file.
|
||||||
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
|
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
|
||||||
// Check if stream is a video.
|
// 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.
|
// Check if codec of stream is mjpeg/png.
|
||||||
// If so then remove this "video" stream.
|
// If so then remove this "video" stream.
|
||||||
// mjpeg/png are usually embedded pictures that can cause havoc with plugins.
|
// mjpeg/png are usually embedded pictures that can cause havoc with plugins.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue