mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-24 19:58:35 +01:00
Add fixme in modified parse_chapters function
A range like '*(now-1hour)-(now-30minutes)' doesn't work
This commit is contained in:
parent
fdb9aaf416
commit
b83d7526f2
1 changed files with 1 additions and 0 deletions
|
@ -337,6 +337,7 @@ def validate_options(opts):
|
||||||
for regex in value or []:
|
for regex in value or []:
|
||||||
if regex.startswith('*'):
|
if regex.startswith('*'):
|
||||||
for range_ in map(str.strip, regex[1:].split(',')):
|
for range_ in map(str.strip, regex[1:].split(',')):
|
||||||
|
# FIXME: This is really sensible
|
||||||
mobj = range_ != '-' and re.fullmatch(r'(.+)?\s*-\s*(.+)?', range_)
|
mobj = range_ != '-' and re.fullmatch(r'(.+)?\s*-\s*(.+)?', range_)
|
||||||
dur = mobj and (parse_timestamp(mobj.group(1) or '0'), parse_timestamp(mobj.group(2) or 'inf'))
|
dur = mobj and (parse_timestamp(mobj.group(1) or '0'), parse_timestamp(mobj.group(2) or 'inf'))
|
||||||
if None in (dur or [None]):
|
if None in (dur or [None]):
|
||||||
|
|
Loading…
Add table
Reference in a new issue