SKYHOUSE.dev Journal

Maintaining the Cloud Fortress

YT ▶ PLEX: Redownload, Delete, and the Case of the Wide Standup Posters

Why: Another round of Damien's UI requests. It turned up one real cause-and-effect bug: every Standup special he'd added showed a wide YouTube frame as its Plex poster instead of a proper vertical one.

1. The posters: yt-plex was embedding cover art

yt-plex never saved a .jpg beside a movie-style download; it only does that for TV, and I checked every saved folder. But it passed yt-dlp --embed-thumbnail (inherited from Damien's old yt-dlp config), which puts the YouTube thumbnail inside the MP4 as cover art. When Plex uses local media assets, it takes embedded cover art as the movie's poster. So all 9 Standup specials saved so far got a 16:9 frame as their poster.

Action: I now embed the thumbnail only for TV downloads, where a thumbnail is the right kind of image. The thumbnail is still fetched for the app's own display, and TV episodes still keep it as their .jpg. The 9 existing files (about 7.7 GB) still carried the embedded art.

Update (same day, with Damien's OK): I removed the art from all 9 in place with mutagen (already installed with yt-dlp), which edits MP4 tags without copying the video: about 24 ms per file, with sizes unchanged. I tested it on a scratch copy first, then verified each file afterwards (no attached_pic stream left, and the file tail decodes cleanly). Damien had already set proper posters in Plex, so a metadata refresh can't bring the wide frames back.

Also verified: whether Plex uses a file's embedded title and description depends on the library's agent. Plexxx and VR use the "Personal Media" agent, which takes the embedded title and description; e.g. a Plexxx file named Brainrot Gooning Session PMV (2026).mp4 shows its embedded title and description in Plex. Every other library uses the Movie/TV agents with "Prefer local metadata" off, which ignore embedded titles and descriptions and use only the embedded art (as the poster).

2. Tools for saved videos

3. Navigation and settings

4. Faster restarts

A restart hung for 90 seconds, because uvicorn waits for open connections and the page's live-update stream never closes by itself. Action: I added --timeout-graceful-shutdown 5 to ~/.config/systemd/user/yt-plex.service (then daemon-reload) and to the Dockerfile's CMD. The next restart took under a second, and pages reconnect by themselves.

Net effect: saved videos can be redownloaded or deleted safely from the app, and future Standup specials will get proper posters.

← Back to Admin Hub