fix: correct Letterboxd rating display (use score/20 instead of value)#321
Conversation
Appends '/5' to Letterboxd rating badges in formatRating() so the display reads 3.7/5 rather than a bare 3.7, matching Letterboxd's native 0-5 scale. Normalization of the raw MDBList value is handled server-side in MdbListController.
a86dd41 to
1c5262f
Compare
|
This was already submitted to the plugin and will be used for all clients, each client doesnt need it |
|
This handles the formatting of the corrected integer (to display as X/5 instead of just X). This is similar to other ratings that are having a percent sign added to them. If we don't include this, the value is passed to the default _ method, which if I recall, wouldn't handle the value properly. I agree that this should ideally happen at the plugin level but for all the ratings - convert everything to strings and pass them as ready to print? But the current PR tried to keep with the logic in place with how the other ratings are handled currently, hence the logic at plugin and formatting at client. |
|
it does double the effort when line 42 |
Pull Request for Letterboxd Rating Fix
Summary
Fixes Letterboxd ratings displaying as doubled values across all clients.
MDBList's
valuefield for Letterboxd is on an ambiguous 0-10 scale(Letterboxd's native scale is 0-5). The previous
value > 5halvingguard 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.
The fix switches to
score / 20, wherescoreis MDBList's always-correct0-100 normalized field, producing a reliable 0-5 result regardless of
what
valuecontains.Related Issues
Type of Change
Changes Made
mdblist_repository.dart: Added aletterboxd-specific branch inthe rating value switch that reads
score / 20instead ofvalue.Normalizing at the source means all clients will get a correct
0-5 value automatically.
rating_icon_provider.dart: Added aletterboxdcase toformatRating()that appends/5so the display reads3.7/5rather than a bare
3.7.Platform
Testing
Test Steps
3.7/5rather than7.4or7.4/5Screenshots
Current build:

Fixed:

Low Score (undeserved!):

Checklist