mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-10 20:32:21 +01:00
Rework parental ratings (#12615)
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
OpenAPI / OpenAPI - HEAD (push) Waiting to run
OpenAPI / OpenAPI - BASE (push) Waiting to run
OpenAPI / OpenAPI - Difference (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
OpenAPI / OpenAPI - HEAD (push) Waiting to run
OpenAPI / OpenAPI - BASE (push) Waiting to run
OpenAPI / OpenAPI - Difference (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
This commit is contained in:
@@ -68,6 +68,6 @@
|
||||
<EmbeddedResource Include="Localization\iso6392.txt" />
|
||||
<EmbeddedResource Include="Localization\countries.json" />
|
||||
<EmbeddedResource Include="Localization\Core\*.json" />
|
||||
<EmbeddedResource Include="Localization\Ratings\*.csv" />
|
||||
<EmbeddedResource Include="Localization\Ratings\*.json" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -11,7 +11,6 @@ using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.Library;
|
||||
@@ -78,15 +77,15 @@ public class SplashscreenPostScanTask : ILibraryPostScanTask
|
||||
CollapseBoxSetItems = false,
|
||||
Recursive = true,
|
||||
DtoOptions = new DtoOptions(false),
|
||||
ImageTypes = new[] { imageType },
|
||||
ImageTypes = [imageType],
|
||||
Limit = 30,
|
||||
// TODO max parental rating configurable
|
||||
MaxParentalRating = 10,
|
||||
OrderBy = new[]
|
||||
{
|
||||
MaxParentalRating = new(10, null),
|
||||
OrderBy =
|
||||
[
|
||||
(ItemSortBy.Random, SortOrder.Ascending)
|
||||
},
|
||||
IncludeItemTypes = new[] { BaseItemKind.Movie, BaseItemKind.Series }
|
||||
],
|
||||
IncludeItemTypes = [BaseItemKind.Movie, BaseItemKind.Series]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -26,20 +25,18 @@ namespace Emby.Server.Implementations.Localization
|
||||
private const string CulturesPath = "Emby.Server.Implementations.Localization.iso6392.txt";
|
||||
private const string CountriesPath = "Emby.Server.Implementations.Localization.countries.json";
|
||||
private static readonly Assembly _assembly = typeof(LocalizationManager).Assembly;
|
||||
private static readonly string[] _unratedValues = { "n/a", "unrated", "not rated", "nr" };
|
||||
private static readonly string[] _unratedValues = ["n/a", "unrated", "not rated", "nr"];
|
||||
|
||||
private readonly IServerConfigurationManager _configurationManager;
|
||||
private readonly ILogger<LocalizationManager> _logger;
|
||||
|
||||
private readonly Dictionary<string, Dictionary<string, ParentalRating>> _allParentalRatings =
|
||||
new Dictionary<string, Dictionary<string, ParentalRating>>(StringComparer.OrdinalIgnoreCase);
|
||||
private readonly Dictionary<string, Dictionary<string, ParentalRatingScore?>> _allParentalRatings = new(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
private readonly ConcurrentDictionary<string, Dictionary<string, string>> _dictionaries =
|
||||
new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
|
||||
private readonly ConcurrentDictionary<string, Dictionary<string, string>> _dictionaries = new(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
private readonly JsonSerializerOptions _jsonOptions = JsonDefaults.Options;
|
||||
|
||||
private List<CultureDto> _cultures = new List<CultureDto>();
|
||||
private List<CultureDto> _cultures = [];
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LocalizationManager" /> class.
|
||||
@@ -68,35 +65,26 @@ namespace Emby.Server.Implementations.Localization
|
||||
continue;
|
||||
}
|
||||
|
||||
string countryCode = resource.Substring(RatingsPath.Length, 2);
|
||||
var dict = new Dictionary<string, ParentalRating>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
var stream = _assembly.GetManifestResourceStream(resource);
|
||||
await using (stream!.ConfigureAwait(false)) // shouldn't be null here, we just got the resource path from Assembly.GetManifestResourceNames()
|
||||
using var stream = _assembly.GetManifestResourceStream(resource);
|
||||
if (stream is not null)
|
||||
{
|
||||
using var reader = new StreamReader(stream!);
|
||||
await foreach (var line in reader.ReadAllLinesAsync().ConfigureAwait(false))
|
||||
var ratingSystem = await JsonSerializer.DeserializeAsync<ParentalRatingSystem>(stream, _jsonOptions).ConfigureAwait(false)
|
||||
?? throw new InvalidOperationException($"Invalid resource path: '{CountriesPath}'");
|
||||
|
||||
var dict = new Dictionary<string, ParentalRatingScore?>();
|
||||
if (ratingSystem.Ratings is not null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line))
|
||||
foreach (var ratingEntry in ratingSystem.Ratings)
|
||||
{
|
||||
continue;
|
||||
foreach (var ratingString in ratingEntry.RatingStrings)
|
||||
{
|
||||
dict[ratingString] = ratingEntry.RatingScore;
|
||||
}
|
||||
}
|
||||
|
||||
string[] parts = line.Split(',');
|
||||
if (parts.Length == 2
|
||||
&& int.TryParse(parts[1], NumberStyles.Integer, CultureInfo.InvariantCulture, out var value))
|
||||
{
|
||||
var name = parts[0];
|
||||
dict.Add(name, new ParentalRating(name, value));
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("Malformed line in ratings file for country {CountryCode}", countryCode);
|
||||
}
|
||||
_allParentalRatings[ratingSystem.CountryCode] = dict;
|
||||
}
|
||||
}
|
||||
|
||||
_allParentalRatings[countryCode] = dict;
|
||||
}
|
||||
|
||||
await LoadCultures().ConfigureAwait(false);
|
||||
@@ -111,22 +99,29 @@ namespace Emby.Server.Implementations.Localization
|
||||
|
||||
private async Task LoadCultures()
|
||||
{
|
||||
List<CultureDto> list = new List<CultureDto>();
|
||||
List<CultureDto> list = [];
|
||||
|
||||
await using var stream = _assembly.GetManifestResourceStream(CulturesPath)
|
||||
?? throw new InvalidOperationException($"Invalid resource path: '{CulturesPath}'");
|
||||
using var reader = new StreamReader(stream);
|
||||
await foreach (var line in reader.ReadAllLinesAsync().ConfigureAwait(false))
|
||||
using var stream = _assembly.GetManifestResourceStream(CulturesPath);
|
||||
if (stream is null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line))
|
||||
throw new InvalidOperationException($"Invalid resource path: '{CulturesPath}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
using var reader = new StreamReader(stream);
|
||||
await foreach (var line in reader.ReadAllLinesAsync().ConfigureAwait(false))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var parts = line.Split('|');
|
||||
var parts = line.Split('|');
|
||||
if (parts.Length != 5)
|
||||
{
|
||||
throw new InvalidDataException($"Invalid culture data found at: '{line}'");
|
||||
}
|
||||
|
||||
if (parts.Length == 5)
|
||||
{
|
||||
string name = parts[3];
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
@@ -139,21 +134,21 @@ namespace Emby.Server.Implementations.Localization
|
||||
continue;
|
||||
}
|
||||
|
||||
string[] threeletterNames;
|
||||
string[] threeLetterNames;
|
||||
if (string.IsNullOrWhiteSpace(parts[1]))
|
||||
{
|
||||
threeletterNames = new[] { parts[0] };
|
||||
threeLetterNames = [parts[0]];
|
||||
}
|
||||
else
|
||||
{
|
||||
threeletterNames = new[] { parts[0], parts[1] };
|
||||
threeLetterNames = [parts[0], parts[1]];
|
||||
}
|
||||
|
||||
list.Add(new CultureDto(name, name, twoCharName, threeletterNames));
|
||||
list.Add(new CultureDto(name, name, twoCharName, threeLetterNames));
|
||||
}
|
||||
}
|
||||
|
||||
_cultures = list;
|
||||
_cultures = list;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -176,82 +171,80 @@ namespace Emby.Server.Implementations.Localization
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<CountryInfo> GetCountries()
|
||||
public IReadOnlyList<CountryInfo> GetCountries()
|
||||
{
|
||||
using StreamReader reader = new StreamReader(
|
||||
_assembly.GetManifestResourceStream(CountriesPath) ?? throw new InvalidOperationException($"Invalid resource path: '{CountriesPath}'"));
|
||||
return JsonSerializer.Deserialize<IEnumerable<CountryInfo>>(reader.ReadToEnd(), _jsonOptions)
|
||||
?? throw new InvalidOperationException($"Resource contains invalid data: '{CountriesPath}'");
|
||||
using var stream = _assembly.GetManifestResourceStream(CountriesPath) ?? throw new InvalidOperationException($"Invalid resource path: '{CountriesPath}'");
|
||||
|
||||
return JsonSerializer.Deserialize<IReadOnlyList<CountryInfo>>(stream, _jsonOptions) ?? [];
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ParentalRating> GetParentalRatings()
|
||||
public IReadOnlyList<ParentalRating> GetParentalRatings()
|
||||
{
|
||||
// Use server default language for ratings
|
||||
// Fall back to empty list if there are no parental ratings for that language
|
||||
var ratings = GetParentalRatingsDictionary()?.Values.ToList()
|
||||
?? new List<ParentalRating>();
|
||||
var ratings = GetParentalRatingsDictionary()?.Select(x => new ParentalRating(x.Key, x.Value)).ToList() ?? [];
|
||||
|
||||
// Add common ratings to ensure them being available for selection
|
||||
// Based on the US rating system due to it being the main source of rating in the metadata providers
|
||||
// Unrated
|
||||
if (!ratings.Any(x => x.Value is null))
|
||||
if (!ratings.Any(x => x is null))
|
||||
{
|
||||
ratings.Add(new ParentalRating("Unrated", null));
|
||||
ratings.Add(new("Unrated", null));
|
||||
}
|
||||
|
||||
// Minimum rating possible
|
||||
if (ratings.All(x => x.Value != 0))
|
||||
if (ratings.All(x => x.RatingScore?.Score != 0))
|
||||
{
|
||||
ratings.Add(new ParentalRating("Approved", 0));
|
||||
ratings.Add(new("Approved", new(0, null)));
|
||||
}
|
||||
|
||||
// Matches PG (this has different age restrictions depending on country)
|
||||
if (ratings.All(x => x.Value != 10))
|
||||
if (ratings.All(x => x.RatingScore?.Score != 10))
|
||||
{
|
||||
ratings.Add(new ParentalRating("10", 10));
|
||||
ratings.Add(new("10", new(10, null)));
|
||||
}
|
||||
|
||||
// Matches PG-13
|
||||
if (ratings.All(x => x.Value != 13))
|
||||
if (ratings.All(x => x.RatingScore?.Score != 13))
|
||||
{
|
||||
ratings.Add(new ParentalRating("13", 13));
|
||||
ratings.Add(new("13", new(13, null)));
|
||||
}
|
||||
|
||||
// Matches TV-14
|
||||
if (ratings.All(x => x.Value != 14))
|
||||
if (ratings.All(x => x.RatingScore?.Score != 14))
|
||||
{
|
||||
ratings.Add(new ParentalRating("14", 14));
|
||||
ratings.Add(new("14", new(14, null)));
|
||||
}
|
||||
|
||||
// Catchall if max rating of country is less than 21
|
||||
// Using 21 instead of 18 to be sure to allow access to all rated content except adult and banned
|
||||
if (!ratings.Any(x => x.Value >= 21))
|
||||
if (!ratings.Any(x => x.RatingScore?.Score >= 21))
|
||||
{
|
||||
ratings.Add(new ParentalRating("21", 21));
|
||||
ratings.Add(new ParentalRating("21", new(21, null)));
|
||||
}
|
||||
|
||||
// A lot of countries don't explicitly have a separate rating for adult content
|
||||
if (ratings.All(x => x.Value != 1000))
|
||||
if (ratings.All(x => x.RatingScore?.Score != 1000))
|
||||
{
|
||||
ratings.Add(new ParentalRating("XXX", 1000));
|
||||
ratings.Add(new ParentalRating("XXX", new(1000, null)));
|
||||
}
|
||||
|
||||
// A lot of countries don't explicitly have a separate rating for banned content
|
||||
if (ratings.All(x => x.Value != 1001))
|
||||
if (ratings.All(x => x.RatingScore?.Score != 1001))
|
||||
{
|
||||
ratings.Add(new ParentalRating("Banned", 1001));
|
||||
ratings.Add(new ParentalRating("Banned", new(1001, null)));
|
||||
}
|
||||
|
||||
return ratings.OrderBy(r => r.Value);
|
||||
return [.. ratings.OrderBy(r => r.RatingScore?.Score).ThenBy(r => r.RatingScore?.SubScore)];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the parental ratings dictionary.
|
||||
/// </summary>
|
||||
/// <param name="countryCode">The optional two letter ISO language string.</param>
|
||||
/// <returns><see cref="Dictionary{String, ParentalRating}" />.</returns>
|
||||
private Dictionary<string, ParentalRating>? GetParentalRatingsDictionary(string? countryCode = null)
|
||||
/// <returns><see cref="Dictionary{String, ParentalRatingScore}" />.</returns>
|
||||
private Dictionary<string, ParentalRatingScore?>? GetParentalRatingsDictionary(string? countryCode = null)
|
||||
{
|
||||
// Fallback to server default if no country code is specified.
|
||||
if (string.IsNullOrEmpty(countryCode))
|
||||
@@ -268,7 +261,7 @@ namespace Emby.Server.Implementations.Localization
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public int? GetRatingLevel(string rating, string? countryCode = null)
|
||||
public ParentalRatingScore? GetRatingScore(string rating, string? countryCode = null)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrEmpty(rating);
|
||||
|
||||
@@ -278,11 +271,11 @@ namespace Emby.Server.Implementations.Localization
|
||||
return null;
|
||||
}
|
||||
|
||||
// Convert integers directly
|
||||
// Convert ints directly
|
||||
// This may override some of the locale specific age ratings (but those always map to the same age)
|
||||
if (int.TryParse(rating, out var ratingAge))
|
||||
{
|
||||
return ratingAge;
|
||||
return new(ratingAge, null);
|
||||
}
|
||||
|
||||
// Fairly common for some users to have "Rated R" in their rating field
|
||||
@@ -295,9 +288,9 @@ namespace Emby.Server.Implementations.Localization
|
||||
if (!string.IsNullOrEmpty(countryCode))
|
||||
{
|
||||
var ratingsDictionary = GetParentalRatingsDictionary(countryCode);
|
||||
if (ratingsDictionary is not null && ratingsDictionary.TryGetValue(rating, out ParentalRating? value))
|
||||
if (ratingsDictionary is not null && ratingsDictionary.TryGetValue(rating, out ParentalRatingScore? value))
|
||||
{
|
||||
return value.Value;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -305,9 +298,9 @@ namespace Emby.Server.Implementations.Localization
|
||||
// Fall back to server default language for ratings check
|
||||
// If it has no ratings, use the US ratings
|
||||
var ratingsDictionary = GetParentalRatingsDictionary() ?? GetParentalRatingsDictionary("us");
|
||||
if (ratingsDictionary is not null && ratingsDictionary.TryGetValue(rating, out ParentalRating? value))
|
||||
if (ratingsDictionary is not null && ratingsDictionary.TryGetValue(rating, out ParentalRatingScore? value))
|
||||
{
|
||||
return value.Value;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,7 +309,7 @@ namespace Emby.Server.Implementations.Localization
|
||||
{
|
||||
if (dictionary.TryGetValue(rating, out var value))
|
||||
{
|
||||
return value.Value;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,7 +319,7 @@ namespace Emby.Server.Implementations.Localization
|
||||
var ratingLevelRightPart = rating.AsSpan().RightPart(':');
|
||||
if (ratingLevelRightPart.Length != 0)
|
||||
{
|
||||
return GetRatingLevel(ratingLevelRightPart.ToString());
|
||||
return GetRatingScore(ratingLevelRightPart.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +335,7 @@ namespace Emby.Server.Implementations.Localization
|
||||
if (ratingLevelRightPart.Length != 0)
|
||||
{
|
||||
// Check rating system of culture
|
||||
return GetRatingLevel(ratingLevelRightPart.ToString(), culture?.TwoLetterISOLanguageName);
|
||||
return GetRatingScore(ratingLevelRightPart.ToString(), culture?.TwoLetterISOLanguageName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -406,7 +399,7 @@ namespace Emby.Server.Implementations.Localization
|
||||
|
||||
private async Task CopyInto(IDictionary<string, string> dictionary, string resourcePath)
|
||||
{
|
||||
await using var stream = _assembly.GetManifestResourceStream(resourcePath);
|
||||
using var stream = _assembly.GetManifestResourceStream(resourcePath);
|
||||
// If a Culture doesn't have a translation the stream will be null and it defaults to en-us further up the chain
|
||||
if (stream is null)
|
||||
{
|
||||
@@ -414,12 +407,7 @@ namespace Emby.Server.Implementations.Localization
|
||||
return;
|
||||
}
|
||||
|
||||
var dict = await JsonSerializer.DeserializeAsync<Dictionary<string, string>>(stream, _jsonOptions).ConfigureAwait(false);
|
||||
if (dict is null)
|
||||
{
|
||||
throw new InvalidOperationException($"Resource contains invalid data: '{stream}'");
|
||||
}
|
||||
|
||||
var dict = await JsonSerializer.DeserializeAsync<Dictionary<string, string>>(stream, _jsonOptions).ConfigureAwait(false) ?? throw new InvalidOperationException($"Resource contains invalid data: '{stream}'");
|
||||
foreach (var key in dict.Keys)
|
||||
{
|
||||
dictionary[key] = dict[key];
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
E,0
|
||||
EC,0
|
||||
T,7
|
||||
M,18
|
||||
AO,18
|
||||
UR,18
|
||||
RP,18
|
||||
X,1000
|
||||
XX,1000
|
||||
XXX,1000
|
||||
XXXX,1000
|
||||
|
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"countryCode": "0-prefer",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["E", "EC"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["T"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["M", "AO", "UR", "RP"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["X", "XX", "XXX", "XXXX"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
Exempt,0
|
||||
G,0
|
||||
7+,7
|
||||
PG,15
|
||||
M,15
|
||||
MA,15
|
||||
MA15+,15
|
||||
MA 15+,15
|
||||
16+,16
|
||||
R,18
|
||||
R18+,18
|
||||
R 18+,18
|
||||
18+,18
|
||||
X18+,1000
|
||||
X 18+,1000
|
||||
X,1000
|
||||
RC,1001
|
||||
|
69
Emby.Server.Implementations/Localization/Ratings/au.json
Normal file
69
Emby.Server.Implementations/Localization/Ratings/au.json
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"countryCode": "au",
|
||||
"supportsSubScores": true,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["Exempt", "G"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7+"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["PG"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["M"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["MA", "MA 15+", "MA15+"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16+"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18+", "R", "R18+", "R 18+"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["X", "X18", "X 18"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["RC"],
|
||||
"ratingScore": {
|
||||
"score": 1001,
|
||||
"subScore": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
AL,0
|
||||
KT,0
|
||||
TOUS,0
|
||||
MG6,6
|
||||
6,6
|
||||
9,9
|
||||
KNT,12
|
||||
12,12
|
||||
14,14
|
||||
16,16
|
||||
18,18
|
||||
|
55
Emby.Server.Implementations/Localization/Ratings/be.json
Normal file
55
Emby.Server.Implementations/Localization/Ratings/be.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"countryCode": "be",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["AL", "KT", "TOUS"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6", "MG6"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12", "KNT"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
Livre,0
|
||||
L,0
|
||||
AL,0
|
||||
ER,10
|
||||
10,10
|
||||
A10,10
|
||||
12,12
|
||||
A12,12
|
||||
14,14
|
||||
A14,14
|
||||
16,16
|
||||
A16,16
|
||||
18,18
|
||||
A18,18
|
||||
|
55
Emby.Server.Implementations/Localization/Ratings/br.json
Normal file
55
Emby.Server.Implementations/Localization/Ratings/br.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"countryCode": "br",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["L", "AL", "Livre"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["10", "A10", "ER"],
|
||||
"ratingScore": {
|
||||
"score": 10,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12", "A12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14", "A14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16", "A16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18", "A18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
E,0
|
||||
G,0
|
||||
TV-Y,0
|
||||
TV-G,0
|
||||
TV-Y7,7
|
||||
TV-Y7-FV,7
|
||||
PG,9
|
||||
TV-PG,9
|
||||
TV-14,14
|
||||
14A,14
|
||||
16+,16
|
||||
NC-17,17
|
||||
R,18
|
||||
TV-MA,18
|
||||
18A,18
|
||||
18+,18
|
||||
A,1000
|
||||
Prohibited,1001
|
||||
|
90
Emby.Server.Implementations/Localization/Ratings/ca.json
Normal file
90
Emby.Server.Implementations/Localization/Ratings/ca.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"countryCode": "ca",
|
||||
"supportsSubScores": true,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["E", "G", "TV-Y", "TV-G"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-Y7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-Y7-FV"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["PG", "TV-PG"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14A"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16+"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["NC-17"],
|
||||
"ratingScore": {
|
||||
"score": 17,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18A"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18+", "TV-MA", "R"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["A"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Prohibited"],
|
||||
"ratingScore": {
|
||||
"score": 1001,
|
||||
"subScore": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
41
Emby.Server.Implementations/Localization/Ratings/cl.json
Normal file
41
Emby.Server.Implementations/Localization/Ratings/cl.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"countryCode": "cl",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["TE"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TE+7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18", "18V", "18S"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
T,0
|
||||
7,7
|
||||
12,12
|
||||
15,15
|
||||
18,18
|
||||
X,1000
|
||||
Prohibited,1001
|
||||
|
55
Emby.Server.Implementations/Localization/Ratings/co.json
Normal file
55
Emby.Server.Implementations/Localization/Ratings/co.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"countryCode": "co",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["T"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["X"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Prohibited"],
|
||||
"ratingScore": {
|
||||
"score": 1001,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
Educational,0
|
||||
Infoprogramm,0
|
||||
FSK-0,0
|
||||
FSK 0,0
|
||||
0,0
|
||||
FSK-6,6
|
||||
FSK 6,6
|
||||
6,6
|
||||
FSK-12,12
|
||||
FSK 12,12
|
||||
12,12
|
||||
FSK-16,16
|
||||
FSK 16,16
|
||||
16,16
|
||||
FSK-18,18
|
||||
FSK 18,18
|
||||
18,18
|
||||
|
41
Emby.Server.Implementations/Localization/Ratings/de.json
Normal file
41
Emby.Server.Implementations/Localization/Ratings/de.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"countryCode": "de",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["0", "FSK 0", "FSK-0", "Educational", "Infoprogramm"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6", "FSK 6", "FSK-6"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12", "FSK 12", "FSK-12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16", "FSK 16", "FSK-16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18", "FSK 18", "FSK-18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
F,0
|
||||
A,0
|
||||
7,7
|
||||
11,11
|
||||
12,12
|
||||
15,15
|
||||
16,16
|
||||
|
48
Emby.Server.Implementations/Localization/Ratings/dk.json
Normal file
48
Emby.Server.Implementations/Localization/Ratings/dk.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"countryCode": "dk",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["F", "A"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["11"],
|
||||
"ratingScore": {
|
||||
"score": 11,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
A,0
|
||||
A/fig,0
|
||||
A/i,0
|
||||
A/i/fig,0
|
||||
APTA,0
|
||||
ERI,0
|
||||
TP,0
|
||||
0+,0
|
||||
6+,6
|
||||
7/fig,7
|
||||
7/i,7
|
||||
7/i/fig,7
|
||||
7,7
|
||||
9+,9
|
||||
10,10
|
||||
12,12
|
||||
12/fig,12
|
||||
13,13
|
||||
14,14
|
||||
16,16
|
||||
16/fig,16
|
||||
18,18
|
||||
18/fig,18
|
||||
X,1000
|
||||
Banned,1001
|
||||
|
90
Emby.Server.Implementations/Localization/Ratings/es.json
Normal file
90
Emby.Server.Implementations/Localization/Ratings/es.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"countryCode": "es",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["0+", "A", "A/i", "A/fig", "A/i/fig", "APTA", "ERI", "TP"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6+"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7", "7/i", "7/fig", "7/i/fig"],
|
||||
"ratingScore": {
|
||||
"score": 11,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9+"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["10"],
|
||||
"ratingScore": {
|
||||
"score": 10,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12", "12/fig"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["13"],
|
||||
"ratingScore": {
|
||||
"score": 13,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16", "16/fig"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18", "18/fig"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["X"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Banned"],
|
||||
"ratingScore": {
|
||||
"score": 1001,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
S,0
|
||||
T,0
|
||||
K7,7
|
||||
7,7
|
||||
K12,12
|
||||
12,12
|
||||
K16,16
|
||||
16,16
|
||||
K18,18
|
||||
18,18
|
||||
|
41
Emby.Server.Implementations/Localization/Ratings/fi.json
Normal file
41
Emby.Server.Implementations/Localization/Ratings/fi.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"countryCode": "fi",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["S", "T"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7", "K7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12", "K12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16", "K16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18", "K18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
Public Averti,0
|
||||
Tous Publics,0
|
||||
TP,0
|
||||
U,0
|
||||
0+,0
|
||||
6+,6
|
||||
9+,9
|
||||
10,10
|
||||
12,12
|
||||
14+,14
|
||||
16,16
|
||||
18,18
|
||||
X,1000
|
||||
|
69
Emby.Server.Implementations/Localization/Ratings/fr.json
Normal file
69
Emby.Server.Implementations/Localization/Ratings/fr.json
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"countryCode": "fr",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["0+", "Public Averti", "Tous Publics", "TP", "U"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6+"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9+"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["10"],
|
||||
"ratingScore": {
|
||||
"score": 10,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14+"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["X"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
All,0
|
||||
E,0
|
||||
G,0
|
||||
U,0
|
||||
0+,0
|
||||
6+,6
|
||||
7+,7
|
||||
PG,8
|
||||
9,9
|
||||
12,12
|
||||
12+,12
|
||||
12A,12
|
||||
12PG,12
|
||||
Teen,13
|
||||
13+,13
|
||||
14+,14
|
||||
15,15
|
||||
16,16
|
||||
Caution,18
|
||||
18,18
|
||||
Mature,1000
|
||||
Adult,1000
|
||||
R18,1000
|
||||
|
97
Emby.Server.Implementations/Localization/Ratings/gb.json
Normal file
97
Emby.Server.Implementations/Localization/Ratings/gb.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"countryCode": "gb",
|
||||
"supportsSubScores": true,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["0+", "All", "E", "G", "U"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6+"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7+"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["PG"],
|
||||
"ratingScore": {
|
||||
"score": 8,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12A", "12PG"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12", "12+"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["13+", "Teen"],
|
||||
"ratingScore": {
|
||||
"score": 13,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14+"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18", "Caution"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Mature", "Adult", "R18"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
G,4
|
||||
PG,12
|
||||
12,12
|
||||
12A,12
|
||||
12PG,12
|
||||
15,15
|
||||
15PG,15
|
||||
15A,15
|
||||
16,16
|
||||
18,18
|
||||
|
55
Emby.Server.Implementations/Localization/Ratings/ie.json
Normal file
55
Emby.Server.Implementations/Localization/Ratings/ie.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"countryCode": "ie",
|
||||
"supportsSubScores": true,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["G"],
|
||||
"ratingScore": {
|
||||
"score": 4,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12A", "12PG", "PG"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15A", "15PG"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
A,0
|
||||
G,0
|
||||
B,12
|
||||
PG12,12
|
||||
C,15
|
||||
15+,15
|
||||
R15+,15
|
||||
16+,16
|
||||
D,17
|
||||
Z,18
|
||||
18+,18
|
||||
|
62
Emby.Server.Implementations/Localization/Ratings/jp.json
Normal file
62
Emby.Server.Implementations/Localization/Ratings/jp.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"countryCode": "jp",
|
||||
"supportsSubScores": true,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["A", "G"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["PG12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["B"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15A", "15PG"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["C", "15+", "R15+"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16+"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["D"],
|
||||
"ratingScore": {
|
||||
"score": 17,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18+", "Z"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
K,0
|
||||
БА,12
|
||||
Б14,14
|
||||
E16,16
|
||||
E18,18
|
||||
HA,18
|
||||
|
41
Emby.Server.Implementations/Localization/Ratings/kz.json
Normal file
41
Emby.Server.Implementations/Localization/Ratings/kz.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"countryCode": "kz",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["K"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["БА"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Б14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["E16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["E18", "HA"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
A,0
|
||||
AA,0
|
||||
B,12
|
||||
B-15,15
|
||||
C,18
|
||||
D,1000
|
||||
|
41
Emby.Server.Implementations/Localization/Ratings/mx.json
Normal file
41
Emby.Server.Implementations/Localization/Ratings/mx.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"countryCode": "mx",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["A", "AA"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["B"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["B-15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["C"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["D"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
AL,0
|
||||
MG6,6
|
||||
6,6
|
||||
9,9
|
||||
12,12
|
||||
14,14
|
||||
16,16
|
||||
18,18
|
||||
|
55
Emby.Server.Implementations/Localization/Ratings/nl.json
Normal file
55
Emby.Server.Implementations/Localization/Ratings/nl.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"countryCode": "nl",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["AL"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6", "MG6"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
A,0
|
||||
6,6
|
||||
7,7
|
||||
9,9
|
||||
11,11
|
||||
12,12
|
||||
15,15
|
||||
18,18
|
||||
C,18
|
||||
Not approved,1001
|
||||
|
69
Emby.Server.Implementations/Localization/Ratings/no.json
Normal file
69
Emby.Server.Implementations/Localization/Ratings/no.json
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"countryCode": "no",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["A"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["11"],
|
||||
"ratingScore": {
|
||||
"score": 11,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Not approved"],
|
||||
"ratingScore": {
|
||||
"score": 1001,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
Exempt,0
|
||||
G,0
|
||||
GY,13
|
||||
PG,13
|
||||
R13,13
|
||||
RP13,13
|
||||
R15,15
|
||||
M,16
|
||||
R16,16
|
||||
RP16,16
|
||||
GA,18
|
||||
R18,18
|
||||
RP18,18
|
||||
MA,1000
|
||||
R,1001
|
||||
Objectionable,1001
|
||||
|
69
Emby.Server.Implementations/Localization/Ratings/nz.json
Normal file
69
Emby.Server.Implementations/Localization/Ratings/nz.json
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"countryCode": "nz",
|
||||
"supportsSubScores": true,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["Exempt", "G"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["RP13", "PG"],
|
||||
"ratingScore": {
|
||||
"score": 13,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["GY", "R13"],
|
||||
"ratingScore": {
|
||||
"score": 13,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["RP16", "M"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["R16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["RP18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["R18", "GA"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["MA"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Objectionable", "R"],
|
||||
"ratingScore": {
|
||||
"score": 1001,
|
||||
"subScore": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
AG,0
|
||||
AP-12,12
|
||||
N-15,15
|
||||
IM-18,18
|
||||
IM-18-XXX,1000
|
||||
IC,1001
|
||||
|
48
Emby.Server.Implementations/Localization/Ratings/ro.json
Normal file
48
Emby.Server.Implementations/Localization/Ratings/ro.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"countryCode": "ro",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["AG"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["AP-12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["N-15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["IM-18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["IM-18-XXX"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["IC"],
|
||||
"ratingScore": {
|
||||
"score": 1001,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
0+,0
|
||||
6+,6
|
||||
12+,12
|
||||
16+,16
|
||||
18+,18
|
||||
Refused classification,1001
|
||||
|
48
Emby.Server.Implementations/Localization/Ratings/ru.json
Normal file
48
Emby.Server.Implementations/Localization/Ratings/ru.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"countryCode": "ru",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["0+"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6+"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12+"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16+"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18+"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Refused classification"],
|
||||
"ratingScore": {
|
||||
"score": 1001,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
Alla,0
|
||||
Barntillåten,0
|
||||
Btl,0
|
||||
0+,0
|
||||
7,7
|
||||
9+,9
|
||||
10+,10
|
||||
11,11
|
||||
14,14
|
||||
15,15
|
||||
|
55
Emby.Server.Implementations/Localization/Ratings/se.json
Normal file
55
Emby.Server.Implementations/Localization/Ratings/se.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"countryCode": "se",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["0+", "Alla", "Barntillåten", "Btl"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9+"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["10+"],
|
||||
"ratingScore": {
|
||||
"score": 10,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["11"],
|
||||
"ratingScore": {
|
||||
"score": 11,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
NR,0
|
||||
U,0
|
||||
7,7
|
||||
12,12
|
||||
15,15
|
||||
18,18
|
||||
|
41
Emby.Server.Implementations/Localization/Ratings/sk.json
Normal file
41
Emby.Server.Implementations/Localization/Ratings/sk.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"countryCode": "sk",
|
||||
"supportsSubScores": false,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["U", "NR"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
All,0
|
||||
E,0
|
||||
G,0
|
||||
U,0
|
||||
0+,0
|
||||
6+,6
|
||||
7+,7
|
||||
PG,8
|
||||
9+,9
|
||||
12,12
|
||||
12+,12
|
||||
12A,12
|
||||
Teen,13
|
||||
13+,13
|
||||
14+,14
|
||||
15,15
|
||||
16,16
|
||||
Caution,18
|
||||
18,18
|
||||
Mature,1000
|
||||
Adult,1000
|
||||
R18,1000
|
||||
|
97
Emby.Server.Implementations/Localization/Ratings/uk.json
Normal file
97
Emby.Server.Implementations/Localization/Ratings/uk.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"countryCode": "gb",
|
||||
"supportsSubScores": true,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["0+", "All", "E", "G", "U"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["6+"],
|
||||
"ratingScore": {
|
||||
"score": 6,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["7+"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["PG"],
|
||||
"ratingScore": {
|
||||
"score": 8,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["9"],
|
||||
"ratingScore": {
|
||||
"score": 9,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12A", "12PG"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["12", "12+"],
|
||||
"ratingScore": {
|
||||
"score": 12,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["13+", "Teen"],
|
||||
"ratingScore": {
|
||||
"score": 13,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["14+"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["15"],
|
||||
"ratingScore": {
|
||||
"score": 15,
|
||||
"subScore": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["16"],
|
||||
"ratingScore": {
|
||||
"score": 16,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["18", "Caution"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["Mature", "Adult", "R18"],
|
||||
"ratingScore": {
|
||||
"score": 1000,
|
||||
"subScore": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
Approved,0
|
||||
G,0
|
||||
TV-G,0
|
||||
TV-Y,0
|
||||
TV-Y7,7
|
||||
TV-Y7-FV,7
|
||||
PG,10
|
||||
TV-PG,10
|
||||
TV-PG-D,10
|
||||
TV-PG-L,10
|
||||
TV-PG-S,10
|
||||
TV-PG-V,10
|
||||
TV-PG-DL,10
|
||||
TV-PG-DS,10
|
||||
TV-PG-DV,10
|
||||
TV-PG-LS,10
|
||||
TV-PG-LV,10
|
||||
TV-PG-SV,10
|
||||
TV-PG-DLS,10
|
||||
TV-PG-DLV,10
|
||||
TV-PG-DSV,10
|
||||
TV-PG-LSV,10
|
||||
TV-PG-DLSV,10
|
||||
PG-13,13
|
||||
TV-14,14
|
||||
TV-14-D,14
|
||||
TV-14-L,14
|
||||
TV-14-S,14
|
||||
TV-14-V,14
|
||||
TV-14-DL,14
|
||||
TV-14-DS,14
|
||||
TV-14-DV,14
|
||||
TV-14-LS,14
|
||||
TV-14-LV,14
|
||||
TV-14-SV,14
|
||||
TV-14-DLS,14
|
||||
TV-14-DLV,14
|
||||
TV-14-DSV,14
|
||||
TV-14-LSV,14
|
||||
TV-14-DLSV,14
|
||||
NC-17,17
|
||||
R,17
|
||||
TV-MA,17
|
||||
TV-MA-L,17
|
||||
TV-MA-S,17
|
||||
TV-MA-V,17
|
||||
TV-MA-LS,17
|
||||
TV-MA-LV,17
|
||||
TV-MA-SV,17
|
||||
TV-MA-LSV,17
|
||||
TV-X,18
|
||||
TV-AO,18
|
||||
|
83
Emby.Server.Implementations/Localization/Ratings/us.json
Normal file
83
Emby.Server.Implementations/Localization/Ratings/us.json
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"countryCode": "us",
|
||||
"supportsSubScores": true,
|
||||
"ratings": [
|
||||
{
|
||||
"ratingStrings": ["Approved", "G", "TV-G", "TV-Y"],
|
||||
"ratingScore": {
|
||||
"score": 0,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-Y7"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-Y7-FV"],
|
||||
"ratingScore": {
|
||||
"score": 7,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["PG", "TV-PG"],
|
||||
"ratingScore": {
|
||||
"score": 10,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-PG-D", "TV-PG-L", "TV-PG-S", "TV-PG-V", "TV-PG-DL", "TV-PG-DS", "TV-PG-DV", "TV-PG-LS", "TV-PG-LV", "TV-PG-SV", "TV-PG-DLS", "TV-PG-DLV", "TV-PG-DSV", "TV-PG-LSV", "TV-PG-DLSV"],
|
||||
"ratingScore": {
|
||||
"score": 10,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["PG-13"],
|
||||
"ratingScore": {
|
||||
"score": 13,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-14"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-14-D", "TV-14-L", "TV-14-S", "TV-14-V", "TV-14-DL", "TV-14-DS", "TV-14-DV", "TV-14-LS", "TV-14-LV", "TV-14-SV", "TV-14-DLS", "TV-14-DLV", "TV-14-DSV", "TV-14-LSV", "TV-14-DLSV"],
|
||||
"ratingScore": {
|
||||
"score": 14,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["R"],
|
||||
"ratingScore": {
|
||||
"score": 17,
|
||||
"subScore": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["NC-17", "TV-MA", "TV-MA-L", "TV-MA-S", "TV-MA-V", "TV-MA-LS", "TV-MA-LV", "TV-MA-SV", "TV-MA-LSV"],
|
||||
"ratingScore": {
|
||||
"score": 17,
|
||||
"subScore": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ratingStrings": ["TV-X", "TV-AO"],
|
||||
"ratingScore": {
|
||||
"score": 18,
|
||||
"subScore": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,45 +1,54 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Querying;
|
||||
|
||||
namespace Emby.Server.Implementations.Sorting
|
||||
namespace Emby.Server.Implementations.Sorting;
|
||||
|
||||
/// <summary>
|
||||
/// Class providing comparison for official ratings.
|
||||
/// </summary>
|
||||
public class OfficialRatingComparer : IBaseItemComparer
|
||||
{
|
||||
public class OfficialRatingComparer : IBaseItemComparer
|
||||
private readonly ILocalizationManager _localizationManager;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OfficialRatingComparer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="localizationManager">Instance of the <see cref="ILocalizationManager"/> interface.</param>
|
||||
public OfficialRatingComparer(ILocalizationManager localizationManager)
|
||||
{
|
||||
private readonly ILocalizationManager _localization;
|
||||
_localizationManager = localizationManager;
|
||||
}
|
||||
|
||||
public OfficialRatingComparer(ILocalizationManager localization)
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public ItemSortBy Type => ItemSortBy.OfficialRating;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
/// </summary>
|
||||
/// <param name="x">The x.</param>
|
||||
/// <param name="y">The y.</param>
|
||||
/// <returns>System.Int32.</returns>
|
||||
public int Compare(BaseItem? x, BaseItem? y)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(x);
|
||||
ArgumentNullException.ThrowIfNull(y);
|
||||
var zeroRating = new ParentalRatingScore(0, 0);
|
||||
|
||||
var ratingX = string.IsNullOrEmpty(x.OfficialRating) ? zeroRating : _localizationManager.GetRatingScore(x.OfficialRating) ?? zeroRating;
|
||||
var ratingY = string.IsNullOrEmpty(y.OfficialRating) ? zeroRating : _localizationManager.GetRatingScore(y.OfficialRating) ?? zeroRating;
|
||||
var scoreCompare = ratingX.Score.CompareTo(ratingY.Score);
|
||||
if (scoreCompare is 0)
|
||||
{
|
||||
_localization = localization;
|
||||
return (ratingX.SubScore ?? 0).CompareTo(ratingY.SubScore ?? 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public ItemSortBy Type => ItemSortBy.OfficialRating;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
/// </summary>
|
||||
/// <param name="x">The x.</param>
|
||||
/// <param name="y">The y.</param>
|
||||
/// <returns>System.Int32.</returns>
|
||||
public int Compare(BaseItem? x, BaseItem? y)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(x);
|
||||
|
||||
ArgumentNullException.ThrowIfNull(y);
|
||||
|
||||
var levelX = string.IsNullOrEmpty(x.OfficialRating) ? 0 : _localization.GetRatingLevel(x.OfficialRating) ?? 0;
|
||||
var levelY = string.IsNullOrEmpty(y.OfficialRating) ? 0 : _localization.GetRatingLevel(y.OfficialRating) ?? 0;
|
||||
|
||||
return levelX.CompareTo(levelY);
|
||||
}
|
||||
return scoreCompare;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user