mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 23:48:15 -07:00
Add remove a newer image attachment of "gif" (#284)
* Add remove a newer image attachment of "gif" * Increment version Co-authored-by: supersnellehenk <rick@marojeri.nl>
This commit is contained in:
parent
4d8aa2dc0d
commit
75c9ae3e55
1 changed files with 4 additions and 3 deletions
|
|
@ -5,8 +5,8 @@ const details = () => ({
|
|||
Name: 'Migz-Remove image formats from file',
|
||||
Type: 'Video',
|
||||
Operation: 'Transcode',
|
||||
Description: 'Identify any unwanted image formats in the file and remove those streams. MJPEG & PNG \n\n',
|
||||
Version: '1.3',
|
||||
Description: 'Identify any unwanted image formats in the file and remove those streams. MJPEG, PNG & GIF \n\n',
|
||||
Version: '1.4',
|
||||
Tags: 'pre-processing,ffmpeg,video only',
|
||||
Inputs: [],
|
||||
});
|
||||
|
|
@ -42,10 +42,11 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
for (let i = 0; i < file.ffProbeData.streams.length; i++) {
|
||||
// Check if stream is video.
|
||||
if (file.ffProbeData.streams[i].codec_type.toLowerCase() === 'video') {
|
||||
// Check if stream codec is mjpeg or png. Remove if so.
|
||||
// Check if stream codec is mjpeg, png or gif. Remove if so.
|
||||
if (
|
||||
file.ffProbeData.streams[i].codec_name === 'mjpeg'
|
||||
|| file.ffProbeData.streams[i].codec_name === 'png'
|
||||
|| file.ffProbeData.streams[i].codec_name === 'gif'
|
||||
) {
|
||||
convert = true;
|
||||
extraArguments += `-map -v:${videoIdx} `;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue