Skip to content

Commit

Permalink
another little fix
Browse files Browse the repository at this point in the history
  • Loading branch information
philpw99 committed Jan 29, 2025
1 parent b16cd6f commit e0bed97
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
3 changes: 1 addition & 2 deletions app/core/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from enum import Enum
from random import randint
from typing import Optional
from ..core.thread.create_task_thread import CreateTaskThread

class MuEnum(Enum):
""" Mutable Enum. Unlike regular Enum, its values can be set again. """
Expand Down Expand Up @@ -542,7 +541,7 @@ class Type(MuEnum):
completed_at: Optional[datetime.datetime] = None
status: Status = Status.PENDING
type: Type = Type.SUBTITLE
task_thread: CreateTaskThread = None
task_thread = None
fraction_downloaded: float = 0.0
work_dir: Optional[str] = None

Expand Down
23 changes: 14 additions & 9 deletions app/view/transcription_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,29 @@ def __init__(self, parent=None):
def setup_ui(self):
self.cardLayout = QVBoxLayout(self)
self.cardLayout.setContentsMargins(20,15,20,15)
self.setup_log_toolbar_layout()
# Log area
self.process_log = QPlainTextEdit(self)
self.process_log.setReadOnly(True)
self.process_log.setMinimumWidth(200)
text_color = "#cccccc" if isDarkTheme() else "#000000"
self.process_log.setStyleSheet(f"QPlainTextEdit{{background:transparent; font-size:12px; color:{text_color}}}")
self.cardLayout.addWidget(self.process_log)

def setup_log_toolbar_layout(self):
# Layout for log
self.log_toolbar_layout = QHBoxLayout(self)
self.log_toolbar_layout = QHBoxLayout()
self.log_label = BodyLabel(self)
self.log_clear_button = PushButton(self.tr("Clear"),self)

self.log_toolbar_layout.addWidget(self.log_label)
self.log_toolbar_layout.addStretch(1)
self.log_toolbar_layout.addWidget(self.log_clear_button)
self.log_label.setText(self.tr("程序日志:"))

# Log area
self.process_log = QPlainTextEdit(self)
self.process_log.setReadOnly(True)
self.process_log.setMinimumWidth(200)
text_color = "#cccccc" if isDarkTheme() else "#000000"
self.process_log.setStyleSheet(f"QPlainTextEdit{{background:transparent; font-size:12px; color:{text_color}}}")

self.cardLayout.addLayout(self.log_toolbar_layout)
self.cardLayout.addWidget(self.process_log)



def addLine(self, text: str):
# After adding a message
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
requests

psutil

openai

retry
Expand Down
4 changes: 2 additions & 2 deletions run.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
call .\.venv\Scripts\activate.bat
python main.py
.\.venv\Scripts\activate.bat
python main.py

0 comments on commit e0bed97

Please sign in to comment.