mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
updated unrated items
This commit is contained in:
parent
c28c94a4e9
commit
4e2debd354
@ -243,6 +243,8 @@ namespace MediaBrowser.Server.Implementations.Localization
|
|||||||
_allParentalRatings.TryAdd(countryCode, dict);
|
_allParentalRatings.TryAdd(countryCode, dict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private readonly string[] _unratedValues = {"n/a", "unrated", "not rated"};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the rating level.
|
/// Gets the rating level.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -253,6 +255,11 @@ namespace MediaBrowser.Server.Implementations.Localization
|
|||||||
throw new ArgumentNullException("rating");
|
throw new ArgumentNullException("rating");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_unratedValues.Contains(rating, StringComparer.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// Fairly common for some users to have "Rated R" in their rating field
|
// Fairly common for some users to have "Rated R" in their rating field
|
||||||
rating = rating.Replace("Rated ", string.Empty, StringComparison.OrdinalIgnoreCase);
|
rating = rating.Replace("Rated ", string.Empty, StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user