fix: normalize Letterboxd ratings to 0-5 scale in MdbListController#138
Merged
RadicalMuffinMan merged 2 commits intoJun 8, 2026
Merged
Conversation
Build SuccessfulThe plugin compiled successfully against .NET 8 / Jellyfin 10.10.0.
|
2881b2a to
b4189f1
Compare
MDBList's value field for Letterboxd is on an ambiguous 0-10 scale (doubled from the native 0-5 scale). Any film scoring 2.5/5 or below produces a value <= 5 after doubling, indistinguishable from a real low-end score, so clients cannot reliably correct it themselves. Fix: normalize in FilterAndOrderRatings() using score / 20 (where score is MDBList's unambiguous 0-100 field) before the data is returned to any client. This fixes the display for all clients without requiring client-side workarounds.
b4189f1 to
76cb8a7
Compare
Contributor
Author
|
Updated the logic to handle the string formatting at the plugin level. |
RadicalMuffinMan
requested changes
Jun 2, 2026
| if (ratingsBySource.TryGetValue(source, out var rating)) | ||
| { | ||
| result.Add(rating); | ||
| // Clone the rating object to prevent mutating the cached instance in memory |
Contributor
There was a problem hiding this comment.
this is overcomplicated. just replace
result.Add(rating);
with
if (string.Equals(rating.Source, "letterboxd", StringComparison.OrdinalIgnoreCase)
&& rating.Value.HasValue
&& rating.Value.Value > 5)
{
rating.Value /= 2;
}
result.Add(rating);
RadicalMuffinMan
requested changes
Jun 8, 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.
Summary
Fixes Letterboxd ratings displaying as doubled values in all clients.
MDBList's
valuefield for Letterboxd is on an ambiguous 0-10 scale(doubled from the native 0-5 scale). The previous client-side
value > 5halving guard failed silently for any film scoring 2.5/5 or below ? those
values after doubling are ? 5 and are indistinguishable from a real low-end
score, so they passed through un-halved and displayed incorrectly. Since
clients receive
valuedirectly from this API, no client can reliably self-correct.The fix normalizes in
FilterAndOrderRatings()usingscore / 20, wherescoreis MDBList's unambiguous 0?100 field, before the data is returned.All clients receive a correct 0?5 value without needing their own workarounds.
Type of Change
Changes Made
MdbListController.cs: Added a Letterboxd-specific normalization stepin
FilterAndOrderRatings(). When a Letterboxd rating is about to bereturned,
Valueis replaced withScore / 20.0. The raw MDBList datain the cache is left untouched; normalization happens on the way out only.
Testing
Verified on physical device (NVIDIA Shield Pro) via the Moonfin Android TV
beta client. Letterboxd badges now display as X.X/5 with correct values
across the full rating range, including films scoring below 2.5/5.
Screenshots
Current build:

Fixed:

Low Score (undeserved!):

Checklist