Selaa lähdekoodia

Simplify AttachmentExtractor instantiation.

Andrew Mahone 5 vuotta sitten
vanhempi
sitoutus
c6855e6a2a
1 muutettua tiedostoa jossa 1 lisäystä ja 5 poistoa
  1. 1 5
      Emby.Server.Implementations/ApplicationHost.cs

+ 1 - 5
Emby.Server.Implementations/ApplicationHost.cs

@@ -282,8 +282,6 @@ namespace Emby.Server.Implementations
 
         private ISubtitleEncoder SubtitleEncoder { get; set; }
 
-        private IAttachmentExtractor AttachmentExtractor { get; set; }
-
         private ISessionManager SessionManager { get; set; }
 
         private ILiveTvManager LiveTvManager { get; set; }
@@ -906,9 +904,7 @@ namespace Emby.Server.Implementations
 
             serviceCollection.AddSingleton(typeof(IResourceFileManager), typeof(ResourceFileManager));
 
-            AttachmentExtractor = new MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor(LibraryManager, LoggerFactory, ApplicationPaths, FileSystemManager, MediaEncoder, MediaSourceManager, ProcessFactory);
-
-            serviceCollection.AddSingleton(AttachmentExtractor);
+            serviceCollection.AddSingleton(typeof(MediaBrowser.Controller.MediaEncoding.IAttachmentExtractor),typeof(MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor));
 
             _displayPreferencesRepository.Initialize();