fix(jellyfin-now-playing): make the bitmap fonts work, and document every setting - #388
Merged
Conversation
…very setting A .bdf is a bitmap face that exists at exactly one pixel size. Requesting any other raises inside FreeType, and the plugin caught that and fell back to PIL's default font -- much smaller than anything the schema offers -- with only a log warning. Measured against the 4-16 sizes the schema allows: 5x7.bdf loads only at 7 fails at 12 of 13 offered sizes 4x6.bdf loads only at 6 fails at 12 of 13 offered sizes cozette.bdf loads at nothing fails at 13 of 13 Bitmap faces now load at their declared PIXEL_SIZE when the requested size is not available, the same fix already in clock-simple, countdown, news, tide-display, mqtt-notifications and youtube-stats. cozette.bdf is dropped from both font menus outright: the core ships no file of that name, so it could never load at any size. Eleven other plugins offer the same non-existent font -- filed as #387. README: real rendered screenshots for the three content types, the three playback states, both progress-bar widths and four panel sizes, rendered against a recorded Jellyfin response with generated poster art. Documents progress_bar_match_text, which was absent entirely, and the eight customization settings that were summarised as one table row. All 21 schema leaves are now covered by key. Tooling: the HTTP replay shim can serve a file as raw bytes via body_file, so a render can include the poster art the plugin fetches rather than the grey placeholder. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 11 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
The replay shim gained a feature on each side and they had to be combined rather than chosen between: main added params_contain (#370, for an API that puts several endpoints behind one URL), while this branch added body_file and changed _match to return a response object rather than a bare body (so poster art can be served as bytes). Resolved so _match filters on params first, then serves either a file as bytes or the JSON body, always wrapped in a _ReplayResponse; both callers pass the request params through. Also dropped a sentinel line the merge duplicated. Verified after resolving: --check reproduces jellyfin's five body_file-driven images and tide-display's params_contain-driven ones byte-identically, so neither side's feature was lost. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The font bug
A
.bdfis a bitmap face that exists at exactly one pixel size. Requesting any other raises inside FreeType, and_load_fontcaught it and fell back toImageFont.load_default()— much smaller than anything the schema offers — with only a log warning. Measured against the 4–16 sizes the schema actually allows:Bitmap faces now load at their declared
PIXEL_SIZEwhen the requested size is unavailable — the same fix already merged forclock-simple(#362),countdown(#363),news(#369),tide-display(#370) andmqtt-notifications/youtube-stats(#374).cozette.bdfis dropped from both font menus. The core ships no file of that name anywhere, so selecting it could never work. Eleven other plugins offer the same non-existent font — filed as #387.The README
It had no images, and two of its settings were effectively undocumented:
progress_bar_match_textwas missing entirely from the configuration reference.customizationwas one table row — "Fonts, sizes, and colors for the title, subtitle, and progress bar" — covering eight nested settings. Each now has its key, default and description.All 21 schema leaves are documented by key; the config-token audit drops nothing.
New images, all real plugin output rendered against a recorded Jellyfin response:
progress_bar_match_textsettings on a 256-wide panel, where the difference actually showsposition / durationreadout wide and tall panels getThe poster art in the fixtures is generated gradients, not real cover art.
Tooling
The HTTP replay shim can now serve a file as raw bytes (
body_file), so a render can include artwork the plugin fetches instead of the grey placeholder. That will also coverledmatrix-music's album art and the weather icons.Checks
check_plugin.py: 8/8 passrender_docs_assets.py --check: all five images reproduce🤖 Generated with Claude Code