From d7f199bb1c43b56cafe8876f620d7757da17d8cd Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Mon, 17 Feb 2020 14:56:31 +0100 Subject: [PATCH 01/12] #2407: Prefer MP4-Metadata for episodes --- .../Library/LibraryManager.cs | 25 +++++++++++++++++++ .../Probing/ProbeResultNormalizer.cs | 3 +++ .../Configuration/LibraryOptions.cs | 1 + MediaBrowser.Model/MediaInfo/MediaInfo.cs | 1 + 4 files changed, 30 insertions(+) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index d983c1dc63..c390d2b823 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -29,11 +29,13 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.LiveTv; +using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Resolvers; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Configuration; +using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; @@ -2387,6 +2389,7 @@ namespace Emby.Server.Implementations.Library public bool FillMissingEpisodeNumbersFromPath(Episode episode, bool forceRefresh) { + var libraryOptions = GetLibraryOptions(episode); var series = episode.Series; bool? isAbsoluteNaming = series == null ? false : string.Equals(series.DisplayOrder, "absolute", StringComparison.OrdinalIgnoreCase); if (!isAbsoluteNaming.Value) @@ -2408,6 +2411,28 @@ namespace Emby.Server.Implementations.Library episodeInfo = new Naming.TV.EpisodeInfo(); } + if (libraryOptions.EnableEmbeddedEpisodeInfos && episodeInfo.Container.ToLowerInvariant() == "mp4") { + // Read from metadata + IMediaEncoder mediaEncoder = _appHost.Resolve(); + var task = mediaEncoder.GetMediaInfo(new MediaInfoRequest + { + MediaSource = episode.GetMediaSources(false).First(), + MediaType = DlnaProfileType.Video, + ExtractChapters = false + + }, CancellationToken.None); + task.Wait(); + if (task.Result.ParentIndexNumber > 0) { + episodeInfo.SeasonNumber = task.Result.ParentIndexNumber; + } + if (task.Result.IndexNumber > 0) { + episodeInfo.EpisodeNumber = task.Result.IndexNumber; + } + if (!string.IsNullOrEmpty(task.Result.ShowName)) { + episodeInfo.SeriesName = task.Result.ShowName; + } + } + var changed = false; if (episodeInfo.IsByDate) diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index bd89c6cae9..f8047af426 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -112,6 +112,9 @@ namespace MediaBrowser.MediaEncoding.Probing info.Name = title; } + info.IndexNumber = FFProbeHelpers.GetDictionaryNumericValue(tags, "episode_sort"); + info.ParentIndexNumber = FFProbeHelpers.GetDictionaryNumericValue(tags, "season_number"); + info.ShowName = FFProbeHelpers.GetDictionaryValue(tags, "show_name"); info.ProductionYear = FFProbeHelpers.GetDictionaryNumericValue(tags, "date"); // Several different forms of retaildate diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index 3c99f9bb5c..9d5d2b869b 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -21,6 +21,7 @@ namespace MediaBrowser.Model.Configuration public bool ImportMissingEpisodes { get; set; } public bool EnableAutomaticSeriesGrouping { get; set; } public bool EnableEmbeddedTitles { get; set; } + public bool EnableEmbeddedEpisodeInfos { get; set; } public int AutomaticRefreshIntervalDays { get; set; } diff --git a/MediaBrowser.Model/MediaInfo/MediaInfo.cs b/MediaBrowser.Model/MediaInfo/MediaInfo.cs index 6ad766d399..237a2b36cb 100644 --- a/MediaBrowser.Model/MediaInfo/MediaInfo.cs +++ b/MediaBrowser.Model/MediaInfo/MediaInfo.cs @@ -36,6 +36,7 @@ namespace MediaBrowser.Model.MediaInfo /// The studios. public string[] Studios { get; set; } public string[] Genres { get; set; } + public string ShowName { get; set; } public int? IndexNumber { get; set; } public int? ParentIndexNumber { get; set; } public int? ProductionYear { get; set; } From 5fed4d10abde3c2c7d0567c81dfd535e5d15a0f3 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 08:39:01 +0100 Subject: [PATCH 02/12] Only reading the result of GetMediaInfo if it completed successfully --- .../Library/LibraryManager.cs | 49 +++++++++++-------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index c390d2b823..b32e98863e 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2389,7 +2389,6 @@ namespace Emby.Server.Implementations.Library public bool FillMissingEpisodeNumbersFromPath(Episode episode, bool forceRefresh) { - var libraryOptions = GetLibraryOptions(episode); var series = episode.Series; bool? isAbsoluteNaming = series == null ? false : string.Equals(series.DisplayOrder, "absolute", StringComparison.OrdinalIgnoreCase); if (!isAbsoluteNaming.Value) @@ -2411,27 +2410,37 @@ namespace Emby.Server.Implementations.Library episodeInfo = new Naming.TV.EpisodeInfo(); } - if (libraryOptions.EnableEmbeddedEpisodeInfos && episodeInfo.Container.ToLowerInvariant() == "mp4") { - // Read from metadata - IMediaEncoder mediaEncoder = _appHost.Resolve(); - var task = mediaEncoder.GetMediaInfo(new MediaInfoRequest - { - MediaSource = episode.GetMediaSources(false).First(), - MediaType = DlnaProfileType.Video, - ExtractChapters = false - - }, CancellationToken.None); - task.Wait(); - if (task.Result.ParentIndexNumber > 0) { - episodeInfo.SeasonNumber = task.Result.ParentIndexNumber; - } - if (task.Result.IndexNumber > 0) { - episodeInfo.EpisodeNumber = task.Result.IndexNumber; - } - if (!string.IsNullOrEmpty(task.Result.ShowName)) { - episodeInfo.SeriesName = task.Result.ShowName; + try + { + var libraryOptions = GetLibraryOptions(episode); + if (libraryOptions.EnableEmbeddedEpisodeInfos && episodeInfo.Container.ToLowerInvariant() == "mp4") { + // Read from metadata + IMediaEncoder mediaEncoder = _appHost.Resolve(); + var task = mediaEncoder.GetMediaInfo(new MediaInfoRequest + { + MediaSource = episode.GetMediaSources(false).First(), + MediaType = DlnaProfileType.Video, + ExtractChapters = false + + }, CancellationToken.None); + task.Wait(); + if (task.IsCompletedSuccessfully) { + if (task.Result.ParentIndexNumber > 0) { + episodeInfo.SeasonNumber = task.Result.ParentIndexNumber; + } + if (task.Result.IndexNumber > 0) { + episodeInfo.EpisodeNumber = task.Result.IndexNumber; + } + if (!string.IsNullOrEmpty(task.Result.ShowName)) { + episodeInfo.SeriesName = task.Result.ShowName; + } + } } } + catch (Exception ex) + { + _logger.LogError(ex, "Error reading the episode informations with ffprobe. Episode: {episodeInfo}", episodeInfo.Path); + } var changed = false; From 39b6d6586f3a788860bf361dec0087ea35191687 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 13:37:36 +0100 Subject: [PATCH 03/12] Update Emby.Server.Implementations/Library/LibraryManager.cs Co-Authored-By: Bond-009 --- Emby.Server.Implementations/Library/LibraryManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index b32e98863e..a2d7f93c21 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2413,7 +2413,8 @@ namespace Emby.Server.Implementations.Library try { var libraryOptions = GetLibraryOptions(episode); - if (libraryOptions.EnableEmbeddedEpisodeInfos && episodeInfo.Container.ToLowerInvariant() == "mp4") { + if (libraryOptions.EnableEmbeddedEpisodeInfos && string.Equals(episodeInfo.Container, "mp4", StringComparison.OrdinalIgnoreCase)) + { // Read from metadata IMediaEncoder mediaEncoder = _appHost.Resolve(); var task = mediaEncoder.GetMediaInfo(new MediaInfoRequest From 4d0ee3f6cc4657ce0acb707873c64b86416c8a56 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 13:39:51 +0100 Subject: [PATCH 04/12] Update Emby.Server.Implementations/Library/LibraryManager.cs Co-Authored-By: Bond-009 --- Emby.Server.Implementations/Library/LibraryManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index a2d7f93c21..12e3c661e5 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2429,6 +2429,7 @@ namespace Emby.Server.Implementations.Library if (task.Result.ParentIndexNumber > 0) { episodeInfo.SeasonNumber = task.Result.ParentIndexNumber; } + if (task.Result.IndexNumber > 0) { episodeInfo.EpisodeNumber = task.Result.IndexNumber; } From 70053266855048deca0d8cefd2eaae020f7bbf95 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 13:40:06 +0100 Subject: [PATCH 05/12] Update Emby.Server.Implementations/Library/LibraryManager.cs Co-Authored-By: Bond-009 --- Emby.Server.Implementations/Library/LibraryManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 12e3c661e5..37bb6741de 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2433,6 +2433,7 @@ namespace Emby.Server.Implementations.Library if (task.Result.IndexNumber > 0) { episodeInfo.EpisodeNumber = task.Result.IndexNumber; } + if (!string.IsNullOrEmpty(task.Result.ShowName)) { episodeInfo.SeriesName = task.Result.ShowName; } From b16ba7d9854dbda4e908908d4790d68a05cd9453 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 13:40:27 +0100 Subject: [PATCH 06/12] Update Emby.Server.Implementations/Library/LibraryManager.cs Co-Authored-By: Bond-009 --- Emby.Server.Implementations/Library/LibraryManager.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 37bb6741de..1f526ff1c4 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2422,7 +2422,6 @@ namespace Emby.Server.Implementations.Library MediaSource = episode.GetMediaSources(false).First(), MediaType = DlnaProfileType.Video, ExtractChapters = false - }, CancellationToken.None); task.Wait(); if (task.IsCompletedSuccessfully) { From 0f2ee2686da4b38496dcc9c0578c82849174b22b Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 16:06:30 +0100 Subject: [PATCH 07/12] Constructor of the LibraryManager takes the mediaEncoder as parameter --- .../ApplicationHost.cs | 24 +++++++-------- .../Library/LibraryManager.cs | 29 +++++++++---------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 0837db251f..ceec972e5d 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -755,7 +755,18 @@ namespace Emby.Server.Implementations serviceCollection.AddSingleton(UserManager); - LibraryManager = new LibraryManager(this, LoggerFactory, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager); + MediaEncoder = new MediaBrowser.MediaEncoding.Encoder.MediaEncoder( + LoggerFactory.CreateLogger(), + ServerConfigurationManager, + FileSystemManager, + ProcessFactory, + LocalizationManager, + () => SubtitleEncoder, + _configuration, + StartupOptions.FFmpegPath); + serviceCollection.AddSingleton(MediaEncoder); + + LibraryManager = new LibraryManager(this, LoggerFactory, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager, MediaEncoder); serviceCollection.AddSingleton(LibraryManager); var musicManager = new MusicManager(LibraryManager); @@ -833,17 +844,6 @@ namespace Emby.Server.Implementations ChapterManager = new ChapterManager(LibraryManager, LoggerFactory, ServerConfigurationManager, ItemRepository); serviceCollection.AddSingleton(ChapterManager); - MediaEncoder = new MediaBrowser.MediaEncoding.Encoder.MediaEncoder( - LoggerFactory.CreateLogger(), - ServerConfigurationManager, - FileSystemManager, - ProcessFactory, - LocalizationManager, - () => SubtitleEncoder, - _configuration, - StartupOptions.FFmpegPath); - serviceCollection.AddSingleton(MediaEncoder); - EncodingManager = new MediaEncoder.EncodingManager(FileSystemManager, LoggerFactory, MediaEncoder, ChapterManager, LibraryManager); serviceCollection.AddSingleton(EncodingManager); diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 1f526ff1c4..cd098739f7 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -143,6 +143,7 @@ namespace Emby.Server.Implementations.Library public bool IsScanRunning { get; private set; } private IServerApplicationHost _appHost; + private IMediaEncoder _mediaEncoder; /// /// The _library items cache @@ -176,7 +177,8 @@ namespace Emby.Server.Implementations.Library Func libraryMonitorFactory, IFileSystem fileSystem, Func providerManagerFactory, - Func userviewManager) + Func userviewManager, + IMediaEncoder mediaEncoder) { _appHost = appHost; _logger = loggerFactory.CreateLogger(nameof(LibraryManager)); @@ -188,6 +190,7 @@ namespace Emby.Server.Implementations.Library _fileSystem = fileSystem; _providerManagerFactory = providerManagerFactory; _userviewManager = userviewManager; + _mediaEncoder = mediaEncoder; _libraryItemsCache = new ConcurrentDictionary(); @@ -2416,26 +2419,22 @@ namespace Emby.Server.Implementations.Library if (libraryOptions.EnableEmbeddedEpisodeInfos && string.Equals(episodeInfo.Container, "mp4", StringComparison.OrdinalIgnoreCase)) { // Read from metadata - IMediaEncoder mediaEncoder = _appHost.Resolve(); - var task = mediaEncoder.GetMediaInfo(new MediaInfoRequest + var mediaInfo = _mediaEncoder.GetMediaInfo(new MediaInfoRequest { MediaSource = episode.GetMediaSources(false).First(), MediaType = DlnaProfileType.Video, ExtractChapters = false - }, CancellationToken.None); - task.Wait(); - if (task.IsCompletedSuccessfully) { - if (task.Result.ParentIndexNumber > 0) { - episodeInfo.SeasonNumber = task.Result.ParentIndexNumber; - } + }, CancellationToken.None).GetAwaiter().GetResult(); + if (mediaInfo.ParentIndexNumber > 0) { + episodeInfo.SeasonNumber = mediaInfo.ParentIndexNumber; + } - if (task.Result.IndexNumber > 0) { - episodeInfo.EpisodeNumber = task.Result.IndexNumber; - } + if (mediaInfo.IndexNumber > 0) { + episodeInfo.EpisodeNumber = mediaInfo.IndexNumber; + } - if (!string.IsNullOrEmpty(task.Result.ShowName)) { - episodeInfo.SeriesName = task.Result.ShowName; - } + if (!string.IsNullOrEmpty(mediaInfo.ShowName)) { + episodeInfo.SeriesName = mediaInfo.ShowName; } } } From d6971581d6777ca2ac1f22a5d1e61ada65c76baf Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 17:46:50 +0100 Subject: [PATCH 08/12] Update Emby.Server.Implementations/Library/LibraryManager.cs Co-Authored-By: Bond-009 --- Emby.Server.Implementations/Library/LibraryManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index cd098739f7..e851998c2e 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2421,7 +2421,7 @@ namespace Emby.Server.Implementations.Library // Read from metadata var mediaInfo = _mediaEncoder.GetMediaInfo(new MediaInfoRequest { - MediaSource = episode.GetMediaSources(false).First(), + MediaSource = episode.GetMediaSources(false)[0], MediaType = DlnaProfileType.Video, ExtractChapters = false }, CancellationToken.None).GetAwaiter().GetResult(); From f4d0fa8dc8bd1d027664b290d9924a7c80c66bf0 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 18:58:28 +0100 Subject: [PATCH 09/12] Update Emby.Server.Implementations/Library/LibraryManager.cs Co-Authored-By: Bond-009 --- Emby.Server.Implementations/Library/LibraryManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index e851998c2e..9a1a383650 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2440,7 +2440,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError(ex, "Error reading the episode informations with ffprobe. Episode: {episodeInfo}", episodeInfo.Path); + _logger.LogError(ex, "Error reading the episode informations with ffprobe. Episode: {EpisodeInfo}", episodeInfo.Path); } var changed = false; From 3d9dc595549d7b6b53d9aee716a83eaf59db5186 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 19:03:42 +0100 Subject: [PATCH 10/12] Omitting the parameter ExtraChapters --- Emby.Server.Implementations/Library/LibraryManager.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 9a1a383650..1fdf8887c8 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2422,8 +2422,7 @@ namespace Emby.Server.Implementations.Library var mediaInfo = _mediaEncoder.GetMediaInfo(new MediaInfoRequest { MediaSource = episode.GetMediaSources(false)[0], - MediaType = DlnaProfileType.Video, - ExtractChapters = false + MediaType = DlnaProfileType.Video }, CancellationToken.None).GetAwaiter().GetResult(); if (mediaInfo.ParentIndexNumber > 0) { episodeInfo.SeasonNumber = mediaInfo.ParentIndexNumber; From a9e744bea0af2578b79acbd96cd5f5f90fbfd9c4 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 19:41:10 +0100 Subject: [PATCH 11/12] Curly braces on new lines --- Emby.Server.Implementations/Library/LibraryManager.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 1fdf8887c8..841f6321aa 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2424,15 +2424,18 @@ namespace Emby.Server.Implementations.Library MediaSource = episode.GetMediaSources(false)[0], MediaType = DlnaProfileType.Video }, CancellationToken.None).GetAwaiter().GetResult(); - if (mediaInfo.ParentIndexNumber > 0) { + if (mediaInfo.ParentIndexNumber > 0) + { episodeInfo.SeasonNumber = mediaInfo.ParentIndexNumber; } - if (mediaInfo.IndexNumber > 0) { + if (mediaInfo.IndexNumber > 0) + { episodeInfo.EpisodeNumber = mediaInfo.IndexNumber; } - if (!string.IsNullOrEmpty(mediaInfo.ShowName)) { + if (!string.IsNullOrEmpty(mediaInfo.ShowName)) + { episodeInfo.SeriesName = mediaInfo.ShowName; } } From 3bd7633cbf451f4ab540229c72bf13b9433b7a45 Mon Sep 17 00:00:00 2001 From: Ulrich Wagner Date: Wed, 19 Feb 2020 19:47:03 +0100 Subject: [PATCH 12/12] Update Emby.Server.Implementations/Library/LibraryManager.cs Co-Authored-By: Bond-009 --- Emby.Server.Implementations/Library/LibraryManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 841f6321aa..55566ed517 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -143,7 +143,7 @@ namespace Emby.Server.Implementations.Library public bool IsScanRunning { get; private set; } private IServerApplicationHost _appHost; - private IMediaEncoder _mediaEncoder; + private readonly IMediaEncoder _mediaEncoder; /// /// The _library items cache