Skip to content

Rewrite display mirroring with tkinter + Pillow, fix UX regressions.#535

Merged
iwalton3 merged 2 commits into
masterfrom
working
May 4, 2026
Merged

Rewrite display mirroring with tkinter + Pillow, fix UX regressions.#535
iwalton3 merged 2 commits into
masterfrom
working

Conversation

@iwalton3
Copy link
Copy Markdown
Member

@iwalton3 iwalton3 commented May 4, 2026

No description provided.

iwalton3 and others added 2 commits May 3, 2026 22:47
Replaces the pywebview + Jinja2 + Edge WebView2 implementation with a
fullscreen tkinter window that draws the backdrop via Pillow and
overlays title / misc info / overview as Canvas text. Same public API
(run/stop/display_content/get_webview), so the rest of the app needs no
changes.

Drops four optional dependencies: Jinja2, pywebview, clr-loader, and
pythonnet. Only the latter mattered in practice — pythonnet's NuGet
self-update step has been failing on Windows + Python 3.14, blocking
the Windows CI. Display mirroring's new requirements (tkinter + Pillow)
are already brought in by the GUI extra and ship with every supported
Python on Windows/Linux/macOS, so display mirroring works on macOS for
the first time.

Visual fidelity is intentionally simpler than the old HTML template:
no rotten-tomatoes badges, no played-percentage ring, no album-mode
title/artist split (the old code had FIXME placeholders for those
anyway). Title font scales down for long episode names. Wrap width
uses the canvas's actual rendered size rather than winfo_screenwidth,
which on multi-monitor and Wayland setups returns the combined virtual
desktop and broke text wrapping.

Net code change: ~830 lines removed across the four-file
display_mirror/ package; ~300 lines added in a single
display_mirror.py.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
set_osd_settings used to silently skip restoring osd_border_style when
border_style was None. If get_osd_settings hit a None at OSDMenu init
(older mpv lacking the property, or an early-startup read race), the
border style would stay at the menu's "background-box" forever and
every subsequent show_text — skip intro toasts, screenshot
confirmations, etc. — inherited the menu background. Always restore
the property; fall back to "outline-and-shadow" (mpv's modern default)
when no original was captured. The inner try/except still tolerates
older mpv that lacks the property.

Skip-intro prompts could overwrite their own toast when the post-skip
position landed inside an outro segment in the very next update tick
(common on short test videos where intro and outro markers are close
in time). Add a 3-second debounce keyed on _last_intro_msg_time, set
by both the toast and prompt paths plus skip_intro itself, so a fresh
skip event suppresses the immediate "Seek to Skip Credits" follow-up
without affecting normal credits prompts later in the video.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@iwalton3 iwalton3 merged commit 58cb0f9 into master May 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant