From 53a8469b8f2d3d82dac64cf47084f41fb0511b05 Mon Sep 17 00:00:00 2001 From: Esa Kataja Date: Wed, 15 Jan 2025 12:10:41 +0200 Subject: [PATCH] FIX Handling video files with attachments --- src/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index f822780..adbb6d3 100644 --- a/src/app.py +++ b/src/app.py @@ -11,7 +11,10 @@ from lib.fs import write_shell_script def parse_streams(stream_data: dict, VideoFile: VideoFile) -> VideoFile: for stream in stream_data["streams"]: - if stream["codec_type"] == "video": + if ( + stream["codec_type"] == "video" + and stream["disposition"]["attached_pic"] == 0 + ): VideoFile.video_streams.append(VideoStream(**stream)) elif stream["codec_type"] == "audio": VideoFile.audio_streams.append(AudioStream(**stream))