| 411 | pass |
| 412 | |
| 413 | def on_task_completed(self, task: FileTranscriptionTask, segments: List[Segment]): |
| 414 | # Update file path in database only for URL imports where file is downloaded |
| 415 | if task.source == FileTranscriptionTask.Source.URL_IMPORT and task.file_path: |
| 416 | logging.debug(f"Updating transcription file path: {task.file_path}") |
| 417 | # Use the file basename (video title) as the display name |
| 418 | basename = os.path.basename(task.file_path) |
| 419 | name = os.path.splitext(basename)[0] # Remove .wav extension |
| 420 | self.transcription_service.update_transcription_file_and_name(task.uid, task.file_path, name) |
| 421 | |
| 422 | self.transcription_service.update_transcription_as_completed(task.uid, segments) |
| 423 | self.table_widget.refresh_row(task.uid) |
| 424 | |
| 425 | if self.quit_on_complete: |
| 426 | self.close() |
| 427 | QApplication.quit() |
| 428 | |
| 429 | |
| 430 | def on_task_error(self, task: FileTranscriptionTask, error: str): |