aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteItemRepository.cs
diff options
context:
space:
mode:
authorredSpoutnik <15638041+redSpoutnik@users.noreply.github.com>2019-03-14 22:31:51 +0100
committerredSpoutnik <15638041+redSpoutnik@users.noreply.github.com>2019-03-14 22:31:51 +0100
commit427688a0a08e04e87774d01e7bfec22eecc71e7d (patch)
tree1d9f08603d4f7a54d701b4c7c1b10e92de81b916 /Emby.Server.Implementations/Data/SqliteItemRepository.cs
parent276428878e2f61c59177d5ab23265a637a3eb7e5 (diff)
Change subtitles DisplayTitle behavior
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs')
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 06f6563a3..1aeb3b9c5 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -22,6 +22,7 @@ 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;
@@ -56,6 +57,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 +69,8 @@ namespace Emby.Server.Implementations.Data
IServerApplicationHost appHost,
IJsonSerializer jsonSerializer,
ILoggerFactory loggerFactory,
- IAssemblyInfo assemblyInfo)
+ IAssemblyInfo assemblyInfo,
+ ILocalizationManager localization)
: base(loggerFactory.CreateLogger(nameof(SqliteItemRepository)))
{
if (config == null)
@@ -83,6 +87,7 @@ namespace Emby.Server.Implementations.Data
_config = config;
_jsonSerializer = jsonSerializer;
_typeMapper = new TypeMapper(assemblyInfo);
+ _localization = localization;
DbFilePath = Path.Combine(_config.ApplicationPaths.DataPath, "library.db");
}
@@ -6189,6 +6194,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;
}
}