aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteItemRepository.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-03-27 16:34:26 +0100
committerGitHub <noreply@github.com>2019-03-27 16:34:26 +0100
commitd0fbd260d5cc386119d96f53cdc1d164b80d02df (patch)
tree55d465b25aae29128b77d1867f0bfd9a1fc3708f /Emby.Server.Implementations/Data/SqliteItemRepository.cs
parent7f42dcc60fd3aaf30f2408f6bddeb2b8bf921cdf (diff)
parent524357bfa845e1c01ef280b1d0fc3896b7b9dbaa (diff)
Merge branch 'master' into httpclient
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs')
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 06f6563a3..088a6694b 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -22,9 +22,9 @@ using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Playlists;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Querying;
-using MediaBrowser.Model.Reflection;
using MediaBrowser.Model.Serialization;
using Microsoft.Extensions.Logging;
using SQLitePCL.pretty;
@@ -56,6 +56,8 @@ namespace Emby.Server.Implementations.Data
private readonly IServerConfigurationManager _config;
private IServerApplicationHost _appHost;
+ private readonly ILocalizationManager _localization;
+
public IImageProcessor ImageProcessor { get; set; }
/// <summary>
@@ -66,7 +68,7 @@ namespace Emby.Server.Implementations.Data
IServerApplicationHost appHost,
IJsonSerializer jsonSerializer,
ILoggerFactory loggerFactory,
- IAssemblyInfo assemblyInfo)
+ ILocalizationManager localization)
: base(loggerFactory.CreateLogger(nameof(SqliteItemRepository)))
{
if (config == null)
@@ -82,7 +84,8 @@ namespace Emby.Server.Implementations.Data
_appHost = appHost;
_config = config;
_jsonSerializer = jsonSerializer;
- _typeMapper = new TypeMapper(assemblyInfo);
+ _typeMapper = new TypeMapper();
+ _localization = localization;
DbFilePath = Path.Combine(_config.ApplicationPaths.DataPath, "library.db");
}
@@ -6189,6 +6192,12 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
item.ColorTransfer = reader[34].ToString();
}
+ if (item.Type == MediaStreamType.Subtitle){
+ item.localizedUndefined = _localization.GetLocalizedString("Undefined");
+ item.localizedDefault = _localization.GetLocalizedString("Default");
+ item.localizedForced = _localization.GetLocalizedString("Forced");
+ }
+
return item;
}
}