diff --git a/buzz/__version__.py b/buzz/__version__.py index 2a3eb2f3..ca638cf3 100644 --- a/buzz/__version__.py +++ b/buzz/__version__.py @@ -1 +1 @@ -VERSION = "1.1.0" +VERSION = "1.1.1" diff --git a/buzz/widgets/transcription_viewer/export_transcription_menu.py b/buzz/widgets/transcription_viewer/export_transcription_menu.py index 42ac50ff..eb450ab0 100644 --- a/buzz/widgets/transcription_viewer/export_transcription_menu.py +++ b/buzz/widgets/transcription_viewer/export_transcription_menu.py @@ -23,17 +23,8 @@ class ExportTranscriptionMenu(QMenu): self.transcription = transcription self.transcription_service = transcription_service - - self.segments = [ - Segment( - start=segment.start_time, - end=segment.end_time, - text=segment.text, - translation=segment.translation) - for segment in self.transcription_service.get_transcription_segments( - transcription_id=self.transcription.id_as_uuid - ) - ] + self.segments = [] + self.load_segments() if self.segments and len(self.segments[0].translation) > 0: text_label = _("Text") @@ -54,6 +45,17 @@ class ExportTranscriptionMenu(QMenu): self.addActions(actions) self.triggered.connect(self.on_menu_triggered) + def load_segments(self): + self.segments = [ + Segment( + start=segment.start_time, + end=segment.end_time, + text=segment.text, + translation=segment.translation) + for segment in self.transcription_service.get_transcription_segments( + transcription_id=self.transcription.id_as_uuid + ) + ] @staticmethod def extract_format_and_segment_key(action_text: str): parts = action_text.split('-') @@ -81,6 +83,9 @@ class ExportTranscriptionMenu(QMenu): if output_file_path == "": return + # Reload segments in case they were resized + self.load_segments() + write_output( path=output_file_path, segments=self.segments, diff --git a/pyproject.toml b/pyproject.toml index d049be83..ed5e6dad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "buzz-captions" -version = "1.1.0" +version = "1.1.1" description = "" authors = ["Chidi Williams "] license = "MIT"