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
- Redownload (e.g. at another quality) puts the video back on Home with the same link, library and name. It's a safe replace: the old files are moved aside and only deleted once the new copy has been saved, and they're put back if anything fails. Tested, including the failure path.
- Delete files… offers Delete / Redownload / Cancel. Delete removes only yt-plex's own files: the video and its
.en.srt, plus the.jpgfor TV. A.jpgin a movie folder is always the owner's poster and is never touched. Emptied Season or movie folders are tidied, never a show folder or library root. - Check for updated subtitles appears for web videos with no subtitles or only auto-generated ones. It prefers channel-made subtitles and replaces the
.en.srtin place. - Saved rows show the actual quality and size ("2160p (452.3 MB)"), recorded when the video is saved and filled in for older rows by a one-time background pass. The Quality picker is gone for saved rows, and Library reads "Move to library". Sizes now read KB/MB/GB everywhere.
3. Navigation and settings
- The header is now Home / History plus a ☰ menu: Guest Access (only once a public address is set), Settings, Log out.
- Guest Access is its own page. Settings → Guests keeps only "where links point", with a setup guide (reverse proxy, Cloudflare Tunnel, Tailscale Funnel) when no public address is set.
- Settings → Apps shows linked app names with green statuses beside them. History's button reads "Clear History", and its ✕ just forgets a row.
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