aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Localization/LocalizationManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs')
-rw-r--r--Emby.Server.Implementations/Localization/LocalizationManager.cs30
1 files changed, 11 insertions, 19 deletions
diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs
index a2c47cd79..5d3c39af4 100644
--- a/Emby.Server.Implementations/Localization/LocalizationManager.cs
+++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs
@@ -1,17 +1,17 @@
-using MediaBrowser.Model.Extensions;
-using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Globalization;
-using MediaBrowser.Model.Serialization;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
+using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.Extensions;
+using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.IO;
-using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Reflection;
+using MediaBrowser.Model.Serialization;
+using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Localization
{
@@ -138,7 +138,7 @@ namespace Emby.Server.Implementations.Localization
new ParentalRating("FSK-18", 9)
});
- LoadRatings("ru", new [] {
+ LoadRatings("ru", new[] {
new ParentalRating("RU-0+", 1),
new ParentalRating("RU-6+", 3),
@@ -298,9 +298,7 @@ namespace Emby.Server.Implementations.Localization
/// <param name="countryCode">The country code.</param>
private Dictionary<string, ParentalRating> GetRatings(string countryCode)
{
- Dictionary<string, ParentalRating> value;
-
- _allParentalRatings.TryGetValue(countryCode, out value);
+ _allParentalRatings.TryGetValue(countryCode, out var value);
return value;
}
@@ -320,9 +318,7 @@ namespace Emby.Server.Implementations.Localization
if (parts.Length == 2)
{
- int value;
-
- if (int.TryParse(parts[1], NumberStyles.Integer, UsCulture, out value))
+ if (int.TryParse(parts[1], NumberStyles.Integer, UsCulture, out var value))
{
return new ParentalRating { Name = parts[0], Value = value };
}
@@ -364,9 +360,7 @@ namespace Emby.Server.Implementations.Localization
var ratingsDictionary = GetParentalRatingsDictionary();
- ParentalRating value;
-
- if (ratingsDictionary.TryGetValue(rating, out value))
+ if (ratingsDictionary.TryGetValue(rating, out ParentalRating value))
{
return value.Value;
}
@@ -427,9 +421,7 @@ namespace Emby.Server.Implementations.Localization
var dictionary = GetLocalizationDictionary(culture);
- string value;
-
- if (dictionary.TryGetValue(phrase, out value))
+ if (dictionary.TryGetValue(phrase, out var value))
{
return value;
}