FIX Handling video files with attachments
This commit is contained in:
+4
-1
@@ -11,7 +11,10 @@ from lib.fs import write_shell_script
|
|||||||
|
|
||||||
def parse_streams(stream_data: dict, VideoFile: VideoFile) -> VideoFile:
|
def parse_streams(stream_data: dict, VideoFile: VideoFile) -> VideoFile:
|
||||||
for stream in stream_data["streams"]:
|
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))
|
VideoFile.video_streams.append(VideoStream(**stream))
|
||||||
elif stream["codec_type"] == "audio":
|
elif stream["codec_type"] == "audio":
|
||||||
VideoFile.audio_streams.append(AudioStream(**stream))
|
VideoFile.audio_streams.append(AudioStream(**stream))
|
||||||
|
|||||||
Reference in New Issue
Block a user