mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #2765] [MERGED] Register And Construct Services Correctly Using DI Framework #9211
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/2765
Author: @mark-monteiro
Created: 4/5/2020
Status: ✅ Merged
Merged: 4/22/2020
Merged by: @Bond-009
Base:
master← Head:register-services-correctly📝 Commits (10+)
e9e12b8Register ISubtitleEncoder correctly92b0d40Move service initializations into correct method3147111Register IAuthService correctly358deecRegister ISessionContext correctly18c1823Register IAuthorizationContext correctly3dbbe54Register IResourceFileManager correctly4ba07b1Register and initialize IActivityRepository correctly7884c38Register IEncodingManager correctly; remove unnecessary properties in ApplicationHost7837091Register IDeviceDiscovery, IChapterManager, IAttachmentExtractor correctlyf1d0fb1Register INotificationManager correctly; resolve services correctly📊 Changes
29 files changed (+503 additions, -831 deletions)
View changed files
📝
Emby.Drawing/ImageProcessor.cs(+4 -30)📝
Emby.Photos/PhotoProvider.cs(+1 -1)📝
Emby.Server.Implementations/ApplicationHost.cs(+188 -414)📝
Emby.Server.Implementations/Data/SqliteItemRepository.cs(+6 -7)📝
Emby.Server.Implementations/Devices/DeviceManager.cs(+3 -3)📝
Emby.Server.Implementations/Dto/DtoService.cs(+16 -14)📝
Emby.Server.Implementations/EntryPoints/StartupWizard.cs(+10 -3)📝
Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs(+5 -4)📝
Emby.Server.Implementations/IO/LibraryMonitor.cs(+26 -32)📝
Emby.Server.Implementations/Library/LibraryManager.cs(+100 -129)📝
Emby.Server.Implementations/Library/MediaSourceManager.cs(+11 -11)📝
Emby.Server.Implementations/Library/SearchEngine.cs(+3 -4)📝
Emby.Server.Implementations/Library/UserDataManager.cs(+18 -19)📝
Emby.Server.Implementations/Library/UserManager.cs(+10 -16)📝
Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs(+0 -1)📝
Emby.Server.Implementations/LiveTv/LiveTvManager.cs(+10 -15)📝
Emby.Server.Implementations/Localization/LocalizationManager.cs(+0 -3)📝
Emby.Server.Implementations/ScheduledTasks/TaskManager.cs(+3 -17)📝
Emby.Server.Implementations/Security/AuthenticationRepository.cs(+2 -2)📝
Jellyfin.Drawing.Skia/SkiaEncoder.cs(+13 -4)...and 9 more files
📄 Description
Update
ApplicationHostto remove as many manual instantiations of singleton services as possible and instead delegate that to the dependency injection framework.The main motivation for this PR is to begin simplifying and cleaning up the the server startup process and the
ApplicationHostclass, which should lead to further optimizations later on.Changes
There shouldn't be much functionally changed here. I've tried to just fix how services are constructed without making any functional changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.