Skip to content

Commit

Permalink
Merge 63a8fa3 into fa4b6ac
Browse files Browse the repository at this point in the history
  • Loading branch information
spoeschel committed Oct 10, 2019
2 parents fa4b6ac + 63a8fa3 commit 4ed0347
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ebu_tt_live/documents/ebutt3.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ def create_compatible_document(self, *args, **kwargs):
clock_mode=self._reference_clock.clock_mode,
sequence_identifier=self._sequence_identifier,
authors_group_identifier=self.authors_group_identifier,
sequence_number=self._last_sequence_number,
sequence_number=kwargs.get('sequence_number', self._last_sequence_number),
lang=self._lang
)

Expand Down Expand Up @@ -992,15 +992,16 @@ def extract_segment(self, begin=None, end=None, sequence_number=None, discard=Fa

begin = doc_ending

current_sequence_number = sequence_number is not None and sequence_number or 1
if not document_segments:
# TODO: This is good question what now? no documents found for range
document = self.create_compatible_document()
document = self.create_compatible_document(sequence_number=current_sequence_number)
# comp_doc.set_begin(begin)
# comp_doc.set_end(end)
else:
splicer = EBUTT3Splicer(
sequence_identifier='{}_resegmented'.format(self.sequence_identifier),
sequence_number=sequence_number is not None and sequence_number or 1,
sequence_number=current_sequence_number,
document_segments=document_segments
)
document = EBUTT3Document.create_from_raw_binding(splicer.spliced_document)
Expand Down

0 comments on commit 4ed0347

Please sign in to comment.