A single-file, batch transcoding GUI for Linux built with PySide6. Wraps av1an for chunk-parallel AV1/VP9/x265 encoding with a retro-futuristic MMD3 media console aesthetic.
This commit is contained in:
parent
244ac2d2f2
commit
55e6f4b1a7
|
|
@ -3454,6 +3454,24 @@ class OpenCodecMaster(QMainWindow):
|
||||||
line_edit.setText(path)
|
line_edit.setText(path)
|
||||||
|
|
||||||
def _log(self, msg: str):
|
def _log(self, msg: str):
|
||||||
|
# Guard against signals (combo currentIndexChanged, knob valueChanged,
|
||||||
|
# etc.) firing during __init__ before self.log_box has been
|
||||||
|
# constructed. Without this, the first addItem() on any combo
|
||||||
|
# triggers its slot, which calls _log(), which dereferences
|
||||||
|
# self.log_box while it is still None -> AttributeError -> crashes
|
||||||
|
# the app on launch. Also buffer messages so they aren't lost.
|
||||||
|
if not hasattr(self, "log_box") or self.log_box is None:
|
||||||
|
buffered = getattr(self, "_log_buffer", None)
|
||||||
|
if buffered is None:
|
||||||
|
buffered = self._log_buffer = []
|
||||||
|
buffered.append(msg)
|
||||||
|
return
|
||||||
|
# Flush any messages that arrived before log_box existed.
|
||||||
|
buffered = getattr(self, "_log_buffer", None)
|
||||||
|
if buffered:
|
||||||
|
for m in buffered:
|
||||||
|
self.log_box.append(f"> {m}")
|
||||||
|
self._log_buffer = []
|
||||||
self.log_box.append(f"> {msg}")
|
self.log_box.append(f"> {msg}")
|
||||||
sb = self.log_box.verticalScrollBar()
|
sb = self.log_box.verticalScrollBar()
|
||||||
sb.setValue(sb.maximum())
|
sb.setValue(sb.maximum())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue