diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-20 14:17:04 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-20 14:17:04 -0400 |
| commit | 2f3cedd87a4b7ab7f09777671ebfb5537bf15523 (patch) | |
| tree | 80686d11c54204a7acdab01487d93c7c780928ad | |
| parent | 1a1cfba795689f5c74fac9cd88d75074c657276c (diff) | |
fixed uk ratings
| -rw-r--r-- | MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/Localization/Ratings/gb.txt | 14 |
2 files changed, 15 insertions, 7 deletions
diff --git a/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs b/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs index 41f18b9a0..817994c04 100644 --- a/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs +++ b/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs @@ -237,6 +237,14 @@ namespace MediaBrowser.Server.Implementations.Localization } } + // Try and support ratings that are incorrectly prefixed with localization values (GB-PG, which is really just PG) + var index = rating.IndexOf('-'); + + if (index != -1) + { + return GetRatingLevel(rating.Substring(index + 1)); + } + return value == null ? (int?)null : value.Value; } } diff --git a/MediaBrowser.Server.Implementations/Localization/Ratings/gb.txt b/MediaBrowser.Server.Implementations/Localization/Ratings/gb.txt index 91d9c87cd..44bf2dde4 100644 --- a/MediaBrowser.Server.Implementations/Localization/Ratings/gb.txt +++ b/MediaBrowser.Server.Implementations/Localization/Ratings/gb.txt @@ -1,7 +1,7 @@ -GB-U,1 -GB-PG,5 -GB-12,6 -GB-12A,7 -GB-15,8 -GB-18,9 -GB-R18,15
\ No newline at end of file +U,1 +PG,5 +12,6 +12A,7 +15,8 +18,9 +R18,15
\ No newline at end of file |
