diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-11-25 12:15:47 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-11-25 12:15:47 -0500 |
| commit | 4e2debd35416fbe4791fdf846db1f03bc02d3d9e (patch) | |
| tree | 7748ae39c92107816aca13fc81e7fbb10399fe02 /MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs | |
| parent | c28c94a4e984d662df2d17ee18ec8552f4e5ea5c (diff) | |
updated unrated items
Diffstat (limited to 'MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs b/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs index cf6eb8f9d..94038c76a 100644 --- a/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs +++ b/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs @@ -243,6 +243,8 @@ namespace MediaBrowser.Server.Implementations.Localization _allParentalRatings.TryAdd(countryCode, dict); } + private readonly string[] _unratedValues = {"n/a", "unrated", "not rated"}; + /// <summary> /// Gets the rating level. /// </summary> @@ -253,6 +255,11 @@ namespace MediaBrowser.Server.Implementations.Localization 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 rating = rating.Replace("Rated ", string.Empty, StringComparison.OrdinalIgnoreCase); |
