|
|
@ -61,11 +61,12 @@ def parse_segment_path(path):
|
|
|
|
if type not in ('full', 'partial', 'temp'):
|
|
|
|
if type not in ('full', 'partial', 'temp'):
|
|
|
|
raise ValueError("Unknown type {!r}".format(type))
|
|
|
|
raise ValueError("Unknown type {!r}".format(type))
|
|
|
|
hash = None if type == 'temp' else unpadded_b64_decode(hash)
|
|
|
|
hash = None if type == 'temp' else unpadded_b64_decode(hash)
|
|
|
|
|
|
|
|
start = None if hour is None else datetime.datetime.strptime("{}:{}".format(hour, time), "%Y-%m-%dT%H:%M:%S.%f")
|
|
|
|
return SegmentInfo(
|
|
|
|
return SegmentInfo(
|
|
|
|
path = path,
|
|
|
|
path = path,
|
|
|
|
channel = channel,
|
|
|
|
channel = channel,
|
|
|
|
quality = quality,
|
|
|
|
quality = quality,
|
|
|
|
start = datetime.datetime.strptime("{}:{}".format(hour, time), "%Y-%m-%dT%H:%M:%S.%f"),
|
|
|
|
start = start,
|
|
|
|
duration = datetime.timedelta(seconds=float(duration)),
|
|
|
|
duration = datetime.timedelta(seconds=float(duration)),
|
|
|
|
type = type,
|
|
|
|
type = type,
|
|
|
|
hash = hash,
|
|
|
|
hash = hash,
|
|
|
|