Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Emby/Emby.Plugins.Moonfin/Api/RatingsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,16 @@ private static List<MdbListRating> FilterAndOrderRatings(List<MdbListRating> all
{
// rtAudience (legacy web) and tomatoes_audience (client) both come from MDBList's
// "popcorn" source. Look it up there but return it under the key the caller asked for.
var lookupSource = (string.Equals(src, "rtAudience", StringComparison.OrdinalIgnoreCase) ||
string.Equals(src, "tomatoes_audience", StringComparison.OrdinalIgnoreCase))
? "popcorn" : src;
var lookupSource = src;
if (string.Equals(src, "rtAudience", StringComparison.OrdinalIgnoreCase) ||
string.Equals(src, "tomatoes_audience", StringComparison.OrdinalIgnoreCase))
{
lookupSource = "popcorn";
}
else if (string.Equals(src, "tomatoes", StringComparison.OrdinalIgnoreCase))
{
lookupSource = "tomato";
}

if (bySource.TryGetValue(lookupSource, out var r))
{
Expand Down
4 changes: 4 additions & 0 deletions Jellyfin/backend/Api/MdbListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ private static List<MdbListRating> FilterAndOrderRatings(List<MdbListRating> all
{
lookupSource = "popcorn";
}
else if (string.Equals(source, "tomatoes", StringComparison.OrdinalIgnoreCase))
{
lookupSource = "tomato";
}

if (ratingsBySource.TryGetValue(lookupSource, out var rating))
{
Expand Down
Loading