mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-17 11:43:44 +01:00
isolated bdinfo dependancy
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Common.Logging;
|
||||
|
||||
namespace MediaBrowser.Controller.Localization
|
||||
{
|
||||
@@ -39,7 +40,7 @@ namespace MediaBrowser.Controller.Localization
|
||||
public static Dictionary<string, int> Initialize(bool blockUnrated)
|
||||
{
|
||||
//build our ratings dictionary from the combined local one and us one
|
||||
ratingsDef = new RatingsDefinition(Path.Combine(Kernel.Instance.ApplicationPaths.LocalizationPath, "Ratings-" + Kernel.Instance.Configuration.MetadataCountryCode+".txt"));
|
||||
ratingsDef = new RatingsDefinition(Path.Combine(Kernel.Instance.ApplicationPaths.LocalizationPath, "Ratings-" + Kernel.Instance.Configuration.MetadataCountryCode + ".txt"), LogManager.GetLogger("RatingsDefinition"));
|
||||
//global value of None
|
||||
var dict = new Dictionary<string, int> {{"None", -1}};
|
||||
foreach (var pair in ratingsDef.RatingsDict)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using MediaBrowser.Common.Logging;
|
||||
|
||||
namespace MediaBrowser.Controller.Localization
|
||||
{
|
||||
@@ -10,13 +10,22 @@ namespace MediaBrowser.Controller.Localization
|
||||
/// </summary>
|
||||
public class RatingsDefinition
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the logger.
|
||||
/// </summary>
|
||||
/// <value>The logger.</value>
|
||||
private ILogger Logger { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RatingsDefinition" /> class.
|
||||
/// </summary>
|
||||
/// <param name="file">The file.</param>
|
||||
public RatingsDefinition(string file)
|
||||
/// <param name="logger">The logger.</param>
|
||||
public RatingsDefinition(string file, ILogger logger)
|
||||
{
|
||||
Logger.LogInfo("Loading Certification Ratings from file " + file);
|
||||
Logger = logger;
|
||||
|
||||
Logger.Info("Loading Certification Ratings from file " + file);
|
||||
this.file = file;
|
||||
if (!Load())
|
||||
{
|
||||
@@ -99,7 +108,7 @@ namespace MediaBrowser.Controller.Localization
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.LogError("Invalid line in ratings file " + file + "(" + line + ")");
|
||||
Logger.Error("Invalid line in ratings file " + file + "(" + line + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user