예제 #1
0
        /// <summary>
        /// Finds the parts.
        /// </summary>
        protected override void FindParts()
        {
            // TODO: Remove after next release
            if (!IsFirstRun && !ServerConfigurationManager.Configuration.IsPortAuthorized)
            {
                ServerConfigurationManager.Configuration.IsPortAuthorized = true;
                ConfigurationManager.SaveConfiguration();
            }

            if (!ServerConfigurationManager.Configuration.IsPortAuthorized)
            {
                RegisterServerWithAdministratorAccess();
            }

            base.FindParts();

            HttpServer.Init(GetExports <IRestfulService>(false));

            ServerManager.AddWebSocketListeners(GetExports <IWebSocketListener>(false));

            StartServer();

            LibraryManager.AddParts(GetExports <IResolverIgnoreRule>(),
                                    GetExports <IVirtualFolderCreator>(),
                                    GetExports <IItemResolver>(),
                                    GetExports <IIntroProvider>(),
                                    GetExports <IBaseItemComparer>(),
                                    GetExports <ILibraryPostScanTask>());

            ProviderManager.AddParts(GetExports <IImageProvider>(),
                                     GetExports <IMetadataService>(),
                                     GetExports <IItemIdentityProvider>(),
                                     GetExports <IItemIdentityConverter>(),
                                     GetExports <IMetadataProvider>(),
                                     GetExports <IMetadataSaver>(),
                                     GetExports <IImageSaver>(),
                                     GetExports <IExternalId>());

            SeriesOrderManager.AddParts(GetExports <ISeriesOrderProvider>());

            ImageProcessor.AddParts(GetExports <IImageEnhancer>());

            LiveTvManager.AddParts(GetExports <ILiveTvService>());

            SubtitleManager.AddParts(GetExports <ISubtitleProvider>());
            ChapterManager.AddParts(GetExports <IChapterProvider>());

            SessionManager.AddParts(GetExports <ISessionControllerFactory>());

            ChannelManager.AddParts(GetExports <IChannel>(), GetExports <IChannelFactory>());

            NotificationManager.AddParts(GetExports <INotificationService>(), GetExports <INotificationTypeFactory>());
            SyncManager.AddParts(GetExports <ISyncProvider>());
        }
예제 #2
0
        /// <summary>
        /// Finds the parts.
        /// </summary>
        protected override void FindParts()
        {
            if (IsFirstRun)
            {
                RegisterServerWithAdministratorAccess();
            }

            base.FindParts();

            HttpServer.Init(GetExports <IRestfulService>(false));

            ServerManager.AddWebSocketListeners(GetExports <IWebSocketListener>(false));

            StartServer(true);

            LibraryManager.AddParts(GetExports <IResolverIgnoreRule>(),
                                    GetExports <IVirtualFolderCreator>(),
                                    GetExports <IItemResolver>(),
                                    GetExports <IIntroProvider>(),
                                    GetExports <IBaseItemComparer>(),
                                    GetExports <ILibraryPostScanTask>());

            ProviderManager.AddParts(GetExports <IImageProvider>(), GetExports <IMetadataService>(), GetExports <IMetadataProvider>(),
                                     GetExports <IMetadataSaver>(),
                                     GetExports <IImageSaver>(),
                                     GetExports <IExternalId>());

            SeriesOrderManager.AddParts(GetExports <ISeriesOrderProvider>());

            ImageProcessor.AddParts(GetExports <IImageEnhancer>());

            LiveTvManager.AddParts(GetExports <ILiveTvService>());

            SubtitleManager.AddParts(GetExports <ISubtitleProvider>());
            ChapterManager.AddParts(GetExports <IChapterProvider>());

            SessionManager.AddParts(GetExports <ISessionControllerFactory>());

            ChannelManager.AddParts(GetExports <IChannel>(), GetExports <IChannelFactory>());

            NotificationManager.AddParts(GetExports <INotificationService>(), GetExports <INotificationTypeFactory>());
        }