- Left/Right arrow keys skip -/+5s (clamped to file bounds), pausing first. QShortcut auto-repeats on its own while held, so no extra timer/logic was needed for 'hold to keep skipping'. - ffmpeg log panel starts hidden (view_menu default flipped to unchecked) rather than visible by default. - _load() now shows 'Loading <name>...' in the status bar and forces one repaint before the blocking mpv load call, then 'Loaded <name>' afterward -- player.load() itself stays synchronous, this just makes the wait visible instead of a silent freeze. Also loosened an unrelated flaky assertion in smoke_test_ui.py: hr-seek was observed landing within ~2 frames of the nominal target across runs (decode-order/B-frame timing, not a regression), and the old 34ms/1-frame tolerance was tighter than that natural variance.
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
import sys
|
|
import time
|
|
from pathlib import Path
|
|
|
|
from PyQt6.QtWidgets import QApplication
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
import main as app_main
|
|
|
|
ROOT = Path(__file__).resolve().parent.parent
|
|
OUT_DIR = ROOT / "test_media" / "seek_validation"
|
|
|
|
|
|
def main():
|
|
OUT_DIR.mkdir(exist_ok=True)
|
|
qapp = QApplication(sys.argv)
|
|
win = app_main.MainWindow()
|
|
win.show()
|
|
qapp.processEvents()
|
|
|
|
assert not win.log_view.isVisible(), "log panel should be hidden by default"
|
|
assert not win.toggle_log_action.isChecked()
|
|
win.grab().save(str(OUT_DIR / "view_menu_log_hidden.png"))
|
|
|
|
win.toggle_log_action.setChecked(True)
|
|
qapp.processEvents()
|
|
assert win.log_view.isVisible(), "toggling the menu action should show the log panel"
|
|
win.grab().save(str(OUT_DIR / "view_menu_log_visible.png"))
|
|
|
|
win.toggle_log_action.setChecked(False)
|
|
qapp.processEvents()
|
|
assert not win.log_view.isVisible()
|
|
|
|
win.player.shutdown()
|
|
print("PASS: View > Show ffmpeg Log toggles the log panel correctly")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|