Skip to content

perf-custom-rows - Optimize TMDb enrichment for MDBList custom rows - #305

Merged
RadicalMuffinMan merged 2 commits into
Moonfin-Client:masterfrom
mattsigal:fix/custom-rows-mdblist-enrichment
Sep 30, 2026
Merged

RadicalMuffinMan merged 2 commits into
Moonfin-Client:masterfrom
mattsigal:fix/custom-rows-mdblist-enrichment

Conversation

@mattsigal

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

The server side optimizations discovered while looking at Moonfin-Client/Moonfin-Core#1698 - basically we were double-fetching artwork when we didn't need to. This PR optimizes backend TMDb metadata enrichment for MDBList custom home rows on both Jellyfin and Emby plugins. TMDb queries are now only dispatched if an item is missing a poster, or for the top 50 items if missing a backdrop. This avoids flooding TMDb with hundreds of redundant parallel requests on large lists where MDBList already provides poster artwork.

Related Issues

Link related issues or tickets separated by commas.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • API / endpoint change
  • Settings schema change
  • Documentation update
  • Build/CI change
  • Other (describe):

Area

  • Settings sync / profiles
  • Admin defaults / config page
  • Ratings (MDBList / TMDB)
  • Notifications / Push (FCM / relay)
  • Seerr integration
  • Games / Emulators
  • Custom home rows
  • Web Client (Go to Moonfin-Core repo)
  • Other / shared

Changes Made

List the key changes included in this PR.

  • CustomRowFetchService.cs (Jellyfin): Restricted TMDb enrichment during MDBList row resolution to items lacking a poster image or the first 50 items lacking a backdrop image (string.IsNullOrEmpty(i.PosterUrl) || (i.Rank <= 50 && string.IsNullOrEmpty(i.BackdropUrl))).
  • CustomRowService.cs (Emby): Applied the identical selective TMDb enrichment optimization for Emby servers.

Client Impact

Does this need matching changes in a client repo (Core, Smart-TV, Roku)?

  • No client changes needed
  • Companion client PR(s) required, linked here:
  • New setting keys added. List each key and confirm it matches the client key exactly, including casing:

Compatibility

  • Change to the settings profile is additive only, no renamed or removed properties
  • New properties use the same type the client sends (a client bool maps to bool?, an int to int?)
  • Migration added for any renamed or removed settings
  • Older clients still work, unknown fields are ignored and no keys were removed

Testing

Describe how this change was tested.

  • Built the plugin and deployed to a Jellyfin server
  • Verified against a live client (which one:) Android TV
  • Manual testing completed
  • Not tested (explain why):

Test Steps

  1. Built and executed unit test suites for Jellyfin (server-plugin.sln, 365 tests passed) and Emby (Emby.Plugins.Moonfin.sln, 239 tests passed).
  2. Deployed compiled Moonfin.Server.dll to local Jellyfin test server.
  3. Tested resolution of large MDBList user list (458 items), verifying cold resolution completed significantly faster without TMDb rate-limiting or task cancellation.

Screenshots (if applicable)

Include config page screenshots or request/response samples where relevant.

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

- Only query TMDb during MDBList row resolution when an item is missing a poster, or for the top 50 items if missing a backdrop.
- Avoids hundreds of redundant parallel TMDb requests on large lists where MDBList already provides poster paths via append_to_response=poster.
- Applied to both Jellyfin (CustomRowFetchService) and Emby (CustomRowService).
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Build Successful

Both plugins compiled against .NET 8, and both test suites passed.

Property Value
Commit bcf41d6
Jellyfin ABI 10.10.0.0
Emby version 2.3.0.0
Workflow Build #450

…cache after the client gives up, have a retry join a resolution that's already running, and drop the top-50 enrichment filter so rows past 50 keep their backdrops
@RadicalMuffinMan
RadicalMuffinMan merged commit 8b8681a into Moonfin-Client:master Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants