Add fixme in modified parse_chapters function

A range like '*(now-1hour)-(now-30minutes)' doesn't work
This commit is contained in:
Elyse 2023-03-09 17:21:02 -06:00
parent fdb9aaf416
commit b83d7526f2

View File

@ -337,6 +337,7 @@ def parse_timestamp(x):
for regex in value or []:
if regex.startswith('*'):
for range_ in map(str.strip, regex[1:].split(',')):
# FIXME: This is really sensible
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'))
if None in (dur or [None]):