Skip to content

Commit

Permalink
(Fix) is_interlaced() return None
Browse files Browse the repository at this point in the history
  • Loading branch information
31December99 committed Sep 29, 2024
1 parent 7f16128 commit 5938e41
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions common/mediainfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ def info(self):
def is_interlaced(self):
video = self.video_track
if video:
encoding_settings = video[0].get("encoding_settings")
match = re.search(r"interlaced=(\d)", encoding_settings)
if match:
return int(match.group(1))
encoding_settings = video[0].get("encoding_settings", None)
if encoding_settings:
match = re.search(r"interlaced=(\d)", encoding_settings)
if match:
return int(match.group(1))

return None

0 comments on commit 5938e41

Please sign in to comment.