Skip to content

Size IMDb chart posters for the clients instead of sending the originals - #321

Open
mike-echo-oscar-whiskey wants to merge 1 commit into
Moonfin-Client:masterfrom
mike-echo-oscar-whiskey:imdb-poster-size
Open

mike-echo-oscar-whiskey wants to merge 1 commit into
Moonfin-Client:masterfrom
mike-echo-oscar-whiskey:imdb-poster-size

Conversation

@mike-echo-oscar-whiskey

@mike-echo-oscar-whiskey mike-echo-oscar-whiskey commented Oct 12, 2026 •

Copy link
Copy Markdown

Pull Request

Summary

The IMDb chart rows hand clients the poster URL exactly as IMDb's GraphQL names it, which is the full-size original: 1200 to 1400 pixels wide and anywhere from 100 KB to 4 MB per title. Every other external row gives a client a 342 or 500 pixel TMDB poster. A Top 250 row is up to 250 of those originals, and the Tizen and Roku clients put the URL straight into an image tag with no resize.

The image host sizes a poster on request through the transform block before the extension (._V1_.jpg is the original, ._V1_UX500_.jpg the 500 pixel wide variant), so the sync task now stores the 500 pixel variant. The Top 250 poster that was 4.2 MB at 1383x2048 comes back as 75 KB at 500x740. Width 500 matches the TMDB w500 the clients already use for an external poster on the details page.

Related Issues

None open. Found while chasing blank IMDb rows on Moonfin for Tizen 2.10.0, which turned out to be the client sending the Amazon URL to image.tmdb.org (fixed on Smart-TV master in 1c31b5ad, after 2.10.0). This change is the server-side half: it does not fix 2.10.0, it keeps the rows from shipping 4 MB posters once the client loads them.

Type of Change

  • Bug fix

Area

  • Custom home rows

Changes Made

  • Jellyfin/backend/Services/ImdbListsTask.cs: SizedPosterUrl rewrites the transform block of an IMDb image URL to UX500; a URL without the block (or already transformed) is left as it is. Applied where the chart's primaryImage.url is read.
  • Emby/Emby.Plugins.Moonfin/Services/ImdbChartFetcher.cs: the same, so both ports hand out the same URL.
  • Tests for the rewrite in both test projects (ImdbChartPosterTests).

Titles cached before this keep the original URL until the next sync, which runs at startup and daily, so an upgrade fixes itself on the restart that installs it.

Client Impact

  • No client changes needed

Compatibility

  • Change to the settings profile is additive only, no renamed or removed properties (no settings touched)
  • Older clients still work, unknown fields are ignored and no keys were removed

Testing

  • Built the plugin and deployed to a Jellyfin server (Jellyfin 12.2.0, the 2.4.0 source with this patch applied)
  • Verified against a live client (which one: Moonfin for Tizen built from Smart-TV main at 657db79e, which carries the client fix, sideloaded on a Samsung TV. The IMDb rows show the posters, served as the 500 pixel variants this change stores)
  • Manual testing completed on the server side

Test Steps

  1. dotnet test on both test projects: 478 and 320 passed, including the three new ones; the salvage tool passes.
  2. Installed the built Moonfin.Server.dll on Jellyfin 12.2.0 and restarted. The startup sync fetched all six charts; imdb_lists_cache.json holds 1050 poster URLs, all 1050 with _V1_UX500_.
  3. GET /Moonfin/CustomRows/Items?source=imdb&type=imdb_top_250_movies returns 250 items with the sized URLs; the first three fetch with HTTP 200 at 500x740 and 500x750.

Screenshots (if applicable)

The same Top 250 poster as the task stored it before and as it stores it now. Both are the live files on IMDb's image host.

Before: ._V1_.jpg, 1200x1800, 334 KB After: ._V1_UX500_.jpg, 500x750, 68 KB
The Shawshank Redemption poster, original size The Shawshank Redemption poster, 500 pixels wide

Before: https://m.media-amazon.com/images/M/MV5BMDAyY2FhYjctNDc5OS00MDNlLThiMGUtY2UxYWVkNGY2ZjljXkEyXkFqcGc@._V1_.jpg
After: https://m.media-amazon.com/images/M/MV5BMDAyY2FhYjctNDc5OS00MDNlLThiMGUtY2UxYWVkNGY2ZjljXkEyXkFqcGc@._V1_UX500_.jpg

Checklist

  • Code builds successfully
  • Code follows project style and conventions
  • No unnecessary commented-out code
  • No new warnings introduced
  • Any new setting keys match the client-side keys exactly (none added)

@github-actions github-actions Bot added Bug Something isn't working Home Rows labels Oct 12, 2026
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Moonfin-Client/Plugin/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 84804c6f-dd04-45c8-b4b6-8251b1be89bb
📥 Commits

Reviewing files that changed from the base of the PR and between 2eda02b and 732775a.

📒 Files selected for processing (4)
  • Emby/Emby.Plugins.Moonfin/Services/ImdbChartFetcher.cs
  • Emby/tests/Emby.Plugins.Moonfin.Tests/ImdbChartPosterTests.cs
  • Jellyfin/backend/Services/ImdbListsTask.cs
  • Jellyfin/tests/Moonfin.Server.Tests/ImdbChartPosterTests.cs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features
    • IMDb chart posters are now requested at a 500-pixel width for more consistent sizing across supported media servers.
    • Poster links without a recognized IMDb sizing pattern, as well as empty links, are left unchanged.

Emby and Jellyfin now apply a 500-pixel width transform to eligible IMDb poster URLs when fetching chart results. Both implementations leave null, empty, and URLs without the expected transform block unchanged, with tests for these cases.

Changes: IMDb Poster Sizing

Layer / File(s) Summary
Emby poster sizing
Emby/Emby.Plugins.Moonfin/Services/ImdbChartFetcher.cs, Emby/tests/Emby.Plugins.Moonfin.Tests/ImdbChartPosterTests.cs
Emby adds SizedPosterUrl with a 500-pixel width transform and applies it to chart poster URLs. Tests cover transformed URLs and unchanged inputs.
Jellyfin poster sizing
Jellyfin/backend/Services/ImdbListsTask.cs, Jellyfin/tests/Moonfin.Server.Tests/ImdbChartPosterTests.cs
Jellyfin adds SizedPosterUrl with a 500-pixel width transform and applies it to chart poster URLs. Tests cover transformed URLs and unchanged inputs.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: radicalmuffinman

Merge Risk: ⚪ Minimal · up to 73277

The change sizes eligible IMDb chart posters in both backends, and no actionable merge-blocking risk is evident from the supplied review context.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 73277

The change selects smaller poster variants within the existing chart-loading flow. It does not add an endpoint, grant privileges, introduce server-side poster fetching, or change cache ownership. No material security risk was found in the reviewed change.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed values propagate through each server's existing shared IMDb chart cache and custom-row consumers. Fetches still select from six named chart keys and request 250 titles per chart; those are query parameters, not a verified bound on a malicious upstream response. The change adds no cache namespace, tenant selector, or privilege.

Trust Boundaries and Controls

  • observed — The existing custom-row authentication boundaries remain in place. Emby marks the route authenticated, checks the current user, and applies the user's rating limit before returning IMDb items; Jellyfin retains its authorized endpoint. Sizing introduces no request-controlled URL source or authorization decision.

Resilience and Maintainability Implications

  • inferred — Normalization adds no shared-state side effect, reservation, cleanup obligation, or asynchronous transition. Completed lists are still published under chart keys before optional enrichment and persistence. Cancellation, partial failure, concurrent replacement, stale fallback, and reload retain their pre-existing mechanics; the PR does not strengthen their atomicity, but no security-relevant weakening was identified.
Pre-merge checks · Passed 4
Passed Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly summarizes the main change: requesting 500-pixel IMDb chart posters instead of original-size posters.
Description check Passed The description covers the required sections and gives detailed changes and test steps. However, it says live-client verification was completed, while the PR objectives say it was not; reconcile this …
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

IMDb's GraphQL names the full-size poster, 1200 to 1400 pixels wide and
between 100 KB and 4 MB each, and the charts handed that URL to the
clients as it was, where every other external row gives a client a 342
or 500 pixel TMDB poster. The image host sizes a poster through the
transform block before the extension, so the task now stores the 500
pixel variant, about 75 KB. Same change on the Emby port. Titles cached
before this keep the original until the next sync, which runs at
startup.
@mike-echo-oscar-whiskey mike-echo-oscar-whiskey changed the title Size IMDb chart posters for the clients instead of sending the originals Is mayonnaise an instrument? Size IMDb chart posters for the clients instead of sending the originals Oct 13, 2026
@mike-echo-oscar-whiskey

Copy link
Copy Markdown
Author

Closed in favour of a fresh pull request from the same branch with a rewritten commit.

@RadicalMuffinMan

Copy link
Copy Markdown
Contributor

No need to close a PR just to re-write a commit

@mike-echo-oscar-whiskey

Copy link
Copy Markdown
Author

Reopened, as there was no need to close it. The branch carries the rewritten commit (d083c53), and the before and after posters are in the Screenshots section now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Home Rows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants