diff options
| author | Vasily <JustAMan@users.noreply.github.com> | 2019-03-17 09:36:35 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-17 09:36:35 +0300 |
| commit | e81a6adb9503161708af5b659f60c6b8df5032a0 (patch) | |
| tree | 118a9b3be9da0e3baac3e1ea0a239777638fc477 /Emby.Server.Implementations/Data/SqliteItemRepository.cs | |
| parent | 67fbbcfd124090ceac670091a0acbb7ebc4b7edd (diff) | |
| parent | 480a6607e2badad925216e715841cce6300ef98e (diff) | |
Merge pull request #1090 from redSpoutnik/subtitle-display-title
Set DisplayTitle for subtitles
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteItemRepository.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 3ae63279b..088a6694b 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.Serialization; @@ -55,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> @@ -64,7 +67,8 @@ namespace Emby.Server.Implementations.Data IServerConfigurationManager config, IServerApplicationHost appHost, IJsonSerializer jsonSerializer, - ILoggerFactory loggerFactory) + ILoggerFactory loggerFactory, + ILocalizationManager localization) : base(loggerFactory.CreateLogger(nameof(SqliteItemRepository))) { if (config == null) @@ -81,6 +85,7 @@ namespace Emby.Server.Implementations.Data _config = config; _jsonSerializer = jsonSerializer; _typeMapper = new TypeMapper(); + _localization = localization; DbFilePath = Path.Combine(_config.ApplicationPaths.DataPath, "library.db"); } @@ -6187,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; } } |
