Skip to content

Commit

Permalink
Support default media sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
bbayles authored and mauricioabreu committed Dec 27, 2022
1 parent f6a6acb commit 71c45af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions m3u8/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ def _initialize_attributes(self):
for attr, param in self.simple_attributes:
setattr(self, attr, self.data.get(param))

if self.media_sequence is not None:
for i, segment in enumerate(self.segments, self.media_sequence):
segment.media_sequence = i
for i, segment in enumerate(self.segments, self.media_sequence or 0):
segment.media_sequence = i

self.files = []
for key in self.keys:
Expand Down

0 comments on commit 71c45af

Please sign in to comment.