Skip to content

Commit

Permalink
Allow arbitrary number of digits in OGM chapter times (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
clr134 authored Aug 2, 2024
1 parent c676553 commit d5aac7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vspreview/toolbars/scening/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,11 @@ def import_matroska_xml_chapters(self, path: Path, scening_list: SceningList, ou

def import_ogm_chapters(self, path: Path, scening_list: SceningList, out_of_range_count: int) -> None:
'''
Imports chapters as signle-frame scenes.
Imports chapters as single-frame scenes.
Uses NAME for scene label.
'''
pattern = re.compile(
r'(CHAPTER\d+)=(\d{2}):(\d{2}):(\d{2}(?:\.\d{3})?)\n\1NAME=(.*)',
r'(CHAPTER\d+)=(\d+):(\d+):(\d+(?:\.\d+)?)\n\1NAME=(.*)',
re.RegexFlag.MULTILINE
)
for match in pattern.finditer(path.read_text('utf8')):
Expand Down

0 comments on commit d5aac7e

Please sign in to comment.