Skip to content

Commit

Permalink
Fix up broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
bbayles committed Jun 21, 2024
1 parent a5c5805 commit a5e4407
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions m3u8/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def parse(content, strict=False, custom_tags_parser=None):

elif line.startswith(protocol.ext_x_cue_out):
_parse_cueout(**parse_kwargs)

elif line.startswith(f"{protocol.ext_oatcls_scte35}:"):
_parse_oatcls_scte35(**parse_kwargs)

Expand Down Expand Up @@ -427,8 +428,8 @@ def _parse_media(line, data, **kwargs):


def _parse_variant_playlist(line, data, state, **kwargs):
stream_info = state.pop("stream_info")
data["playlists"].append({"uri": line, "stream_info": stream_info})
playlist = {"uri": line, "stream_info": state.pop("stream_info")}
data["playlists"].append(playlist)
state["expect_playlist"] = False


Expand Down Expand Up @@ -541,6 +542,8 @@ def _parse_endlist(data, **kwargs):


def _parse_cueout_cont(line, state, **kwargs):
state["cue_out"] = True

elements = line.split(":", 1)
if len(elements) != 2:
return
Expand Down Expand Up @@ -574,8 +577,6 @@ def _parse_cueout_cont(line, state, **kwargs):
if elapsedtime:
state["current_cue_out_elapsedtime"] = elapsedtime

state["cue_out"] = True


def _cueout_no_duration(line):
# this needs to be called first since line.split in all other
Expand Down Expand Up @@ -621,8 +622,6 @@ def _parse_cueout(line, state, **kwargs):
state["current_cue_out_scte35"] = cue_out_scte35 or current_cue_out_scte35
state["current_cue_out_duration"] = cue_out_duration

state["cue_out_start"] = True
state["cue_out"] = True
state["cue_out_start"] = True
state["cue_out"] = True
if "DURATION" in line.upper():
Expand Down

0 comments on commit a5e4407

Please sign in to comment.