public PlexLibraryService(
     IMediator mediator,
     IPlexAuthenticationService plexAuthenticationService,
     IPlexApiService plexServiceApi,
     ISignalRService signalRService)
 {
     _mediator = mediator;
     _plexAuthenticationService = plexAuthenticationService;
     _plexServiceApi            = plexServiceApi;
     _signalRService            = signalRService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PlexDownloadService"/> class.
 /// </summary>
 /// <param name="mediator"></param>
 /// <param name="downloadManager"></param>
 /// <param name="plexAuthenticationService"></param>
 /// <param name="fileSystem"></param>
 /// <param name="plexApiService"></param>
 /// <param name="signalRService"></param>
 /// <param name="folderPathService"></param>
 /// <param name="notificationsService"></param>
 public PlexDownloadService(
     IMediator mediator,
     IDownloadManager downloadManager,
     IPlexAuthenticationService plexAuthenticationService,
     IFileSystem fileSystem,
     IPlexApiService plexApiService,
     ISignalRService signalRService,
     IFolderPathService folderPathService,
     INotificationsService notificationsService)
 {
     _mediator                  = mediator;
     _downloadManager           = downloadManager;
     _plexAuthenticationService = plexAuthenticationService;
     _fileSystem                = fileSystem;
     _plexApiService            = plexApiService;
     _signalRService            = signalRService;
     _folderPathService         = folderPathService;
     _notificationsService      = notificationsService;
 }
Exemple #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DownloadManager"/> class.
        /// </summary>
        /// <param name="mediator">Defines a mediator to encapsulate request/response and publishing interaction patterns.</param>
        /// <param name="signalRService"></param>
        /// <param name="plexAuthenticationService">.</param>
        /// <param name="fileMerger">.</param>
        /// <param name="userSettings"></param>
        /// <param name="downloadQueue">Used to retrieve the next <see cref="DownloadTask"/> from the <see cref="DownloadQueue"/>.</param>
        /// <param name="notificationsService"></param>
        /// <param name="plexDownloadClientFactory"></param>
        public DownloadManager(
            IMediator mediator,
            ISignalRService signalRService,
            IPlexAuthenticationService plexAuthenticationService,
            IFileMerger fileMerger,
            IUserSettings userSettings,
            IDownloadQueue downloadQueue,
            INotificationsService notificationsService,
            Func <DownloadTask, PlexDownloadClient> plexDownloadClientFactory) : base(mediator, signalRService)
        {
            _plexAuthenticationService = plexAuthenticationService;
            _fileMerger                = fileMerger;
            _userSettings              = userSettings;
            _notificationsService      = notificationsService;
            _plexDownloadClientFactory = plexDownloadClientFactory;
            _downloadQueue             = downloadQueue;

            _fileMerger.FileMergeProgressObservable.Subscribe(OnFileMergeProgress);
        }