FIX Handling video files with attachments

This commit is contained in:
Esa Kataja
2025-01-15 12:10:41 +02:00
parent 4abc40e75d
commit 53a8469b8f
+4 -1
View File
@@ -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))