Skip to content

Commit

Permalink
fix bug in get_codec
Browse files Browse the repository at this point in the history
  • Loading branch information
fsadannn committed Sep 23, 2020
1 parent dd72226 commit c33789c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
*.w4a
*.aac
*.vscode
dist
2 changes: 1 addition & 1 deletion video_diet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def get_codec(path: str):
except:
return None

if 'video' in metadata.streams:
if len(metadata.video) != 0:
return metadata.video[0].codec_name

return metadata.audio[0].codec_name
Expand Down

0 comments on commit c33789c

Please sign in to comment.