aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-11-06 10:02:22 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-11-06 10:02:22 -0500
commitce34c35b944ec8dcc56a4a68ac4d363d0f76db06 (patch)
treed6e908382140093734ccab97e42b9e4cc889cc7c /MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs
parent6aa3313bc05fe5a26cee8944c00489c022612069 (diff)
encode with qsv
Diffstat (limited to 'MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs7
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);