mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
Merge pull request #139 from abenea/crash
Fix importing chapters in the PyQt UI.
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
"""Backwards-compatible re-export of conversion module.
|
|
||||||
|
|
||||||
The PyQt-based implementation lives in abogen.pyqt.conversion.
|
|
||||||
The web-based implementation is in abogen.webui.conversion_runner.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
# Re-export PyQt conversion classes for backwards compatibility
|
|
||||||
from abogen.pyqt.conversion import ( # noqa: F401
|
|
||||||
ConversionThread,
|
|
||||||
VoicePreviewThread,
|
|
||||||
PlayAudioThread,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["ConversionThread", "VoicePreviewThread", "PlayAudioThread"]
|
|
||||||
+1
-5
@@ -74,7 +74,7 @@ from abogen.subtitle_utils import (
|
|||||||
calculate_text_length,
|
calculate_text_length,
|
||||||
)
|
)
|
||||||
|
|
||||||
from abogen.conversion import ConversionThread, VoicePreviewThread, PlayAudioThread
|
from abogen.pyqt.conversion import ConversionThread, VoicePreviewThread, PlayAudioThread, ChapterOptionsDialog, TimestampDetectionDialog
|
||||||
from abogen.pyqt.book_handler import HandlerDialog
|
from abogen.pyqt.book_handler import HandlerDialog
|
||||||
from abogen.constants import (
|
from abogen.constants import (
|
||||||
PROGRAM_NAME,
|
PROGRAM_NAME,
|
||||||
@@ -2991,8 +2991,6 @@ class abogen(QWidget):
|
|||||||
"""Show dialog to ask user about chapter processing options when chapters are detected in a .txt file"""
|
"""Show dialog to ask user about chapter processing options when chapters are detected in a .txt file"""
|
||||||
# Check if this is a timestamp detection (-1) or chapter detection
|
# Check if this is a timestamp detection (-1) or chapter detection
|
||||||
if chapter_count == -1:
|
if chapter_count == -1:
|
||||||
from abogen.conversion import TimestampDetectionDialog
|
|
||||||
|
|
||||||
dialog = TimestampDetectionDialog(parent=self)
|
dialog = TimestampDetectionDialog(parent=self)
|
||||||
dialog.setWindowModality(Qt.WindowModality.ApplicationModal)
|
dialog.setWindowModality(Qt.WindowModality.ApplicationModal)
|
||||||
|
|
||||||
@@ -3007,8 +3005,6 @@ class abogen(QWidget):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Normal chapter detection
|
# Normal chapter detection
|
||||||
from abogen.conversion import ChapterOptionsDialog
|
|
||||||
|
|
||||||
dialog = ChapterOptionsDialog(chapter_count, parent=self)
|
dialog = ChapterOptionsDialog(chapter_count, parent=self)
|
||||||
dialog.setWindowModality(Qt.WindowModality.ApplicationModal)
|
dialog.setWindowModality(Qt.WindowModality.ApplicationModal)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user