feat(ZDFmediathek): show current title, cover and add settings#10913
Merged
Conversation
Rework the activity for the current (Svelte) ZDF site, whose redesign broke the old breadcrumb-based selectors: - Show the playing video's title, series and parsed info (episode, genre, year, broadcaster) with cover art as the large image. - Anchor on stable selectors (og: meta, .zdfplayer-* classes) and cache the player overlay per URL so details persist during playback. - Detect live streams via the media duration instead of the URL path. - Add browsing presence for series, category, search and live pages. - Add settings: privacy mode, hide on pause, cover image, channel logo as small icon, timestamps, buttons, format strings and status display. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
🖼️ Activity asset previewAsset inspection complete. No pixels were harmed in the making of this comment. 🤖 ZDFmediathek (
|
| Preview | Source | URL |
|---|---|---|
![]() |
logo | https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/logo.png |
| thumbnail | https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/thumbnail.jpg | |
![]() |
code (presence.ts) |
https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/0.png |
![]() |
code (presence.ts) |
https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/1.png |
![]() |
code (presence.ts) |
https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/2.png |
![]() |
code (presence.ts) |
https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/3.png |
![]() |
code (presence.ts) |
https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/4.png |
![]() |
code (presence.ts) |
https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/5.png |
![]() |
code (presence.ts) |
https://cdn.rcd.gg/PreMiD/websites/Z/ZDFmediathek/assets/6.png |
Beep boop — I refresh this comment on every push, so no need to scroll. 🤖
Contributor
There was a problem hiding this comment.
Pull request overview
Reworks the ZDFmediathek presence to support the redesigned (Svelte-based) zdf.de player pages by switching to more stable selectors, improving playback detection, and expanding browsing coverage. It also introduces a configurable settings surface (privacy, timestamps, buttons, formatting, and status display options) and bumps the activity version to 2.0.0.
Changes:
- Replaced brittle breadcrumb/selectors with
og:*meta tags and.zdfplayer-*player classes; added per-URL overlay info caching and richer video parsing. - Added presence states for non-playback pages (home, search, live overview, series/category pages).
- Added a comprehensive settings block (privacy, hide-on-pause, cover/channel icons, timestamps/buttons, format strings, status display type) and bumped version
1.1.1→2.0.0.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| websites/Z/ZDFmediathek/presence.ts | Rebuilds activity detection/rendering for the new ZDF player, adds overlay caching, live detection, browsing states, and wiring for new settings. |
| websites/Z/ZDFmediathek/metadata.json | Bumps version and adds new user-configurable settings for privacy/formatting/display behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+190
to
+192
| const hasMedia = !!video && !Number.isNaN(video.duration) | ||
| const live = !!video && !Number.isFinite(video.duration) | ||
|
|
Comment on lines
+276
to
+287
| // Privacy mode: only reveal that the user is on ZDFmediathek. | ||
| if (privacy) { | ||
| presenceData.details = localized.browsing | ||
| delete presenceData.state | ||
| delete presenceData.smallImageKey | ||
| delete presenceData.smallImageText | ||
| delete presenceData.largeImageText | ||
| delete presenceData.buttons | ||
| delete presenceData.endTimestamp | ||
| presenceData.largeImageKey = ActivityAssets.Logo | ||
| presenceData.startTimestamp = browsingTimestamp | ||
| } |
Contributor
Author
- Gate live detection behind hasMedia so a still-loading NaN duration is not briefly reported as a livestream. - Reset the activity name in privacy mode to avoid leaking the title via StatusDisplayType.Name. - Use a non-capturing group in the info-line genre regex (ESLint). - Replace the deprecated no-arg setActivity() with clearActivity(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bas950
approved these changes
Jul 1, 2026
Bas950
enabled auto-merge (squash)
July 1, 2026 07:39
skullysmods
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Description
Reworks the ZDFmediathek activity for the current (Svelte-based) ZDF site. The redesign of
zdf.de(/play/…,/dokus/…) broke the old breadcrumb-based selectors, so the activity showed essentially nothing on video-on-demand pages.Watching
og:meta tags,.zdfplayer-*player classes) instead of the build-hashed Svelte class names, which change on every deploy./play/URLs).Browsing
/dokus,/serien,/filme,/kinder, …), search (/suche) and the live overview (/live-tv).Settings (new)
Privacy mode · Hide on pause · Cover image · Channel logo as small icon · Timestamps · Buttons · Format strings (
%title%,%series%,%episode%,%genre%,%year%) · Status display type.Version bumped
1.1.1→2.0.0. No new assets required.🤖 Generated with Claude Code