Beispiel #1
0
 public PismoInstaller(IHttpClient httpClient, ILogger logger, IApplicationPaths appPaths, IZipClient zipClient)
 {
     _httpClient = httpClient;
     _logger     = logger;
     _appPaths   = appPaths;
     _zipClient  = zipClient;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PismoIsoManager" /> class.
 /// </summary>
 public PismoIsoManager(ILogger logger, IHttpClient httpClient, IApplicationPaths appPaths, IZipClient zipClient)
 {
     _logger     = logger;
     _httpClient = httpClient;
     _appPaths   = appPaths;
     _zipClient  = zipClient;
 }
Beispiel #3
0
        public LegendasTVProvider(
            ILogger logger,
            IHttpClient httpClient,
            IServerConfigurationManager config,
            IEncryptionManager encryption,
            ILocalizationManager localizationManager,
            ILibraryManager libraryManager,
            IJsonSerializer jsonSerializer,
            IServerApplicationPaths appPaths,
            IFileSystem fileSystem,
            IZipClient zipClient)
        {
            _logger              = logger;
            _httpClient          = httpClient;
            _config              = config;
            _encryption          = encryption;
            _libraryManager      = libraryManager;
            _localizationManager = localizationManager;
            _jsonSerializer      = jsonSerializer;
            _appPaths            = appPaths;
            _fileSystem          = fileSystem;
            _zipClient           = zipClient;

            _config.NamedConfigurationUpdating += _config_NamedConfigurationUpdating;

            // Load HtmlAgilityPack from embedded resource
            EmbeddedAssembly.Load(GetType().Namespace + ".HtmlAgilityPack.dll", "HtmlAgilityPack.dll");
            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler((object sender, ResolveEventArgs args) => EmbeddedAssembly.Get(args.Name));
        }
        public InternalDirectShowPlayer(ILogManager logManager, IHiddenWindow hiddenWindow, IPresentationManager presentation, ISessionManager sessionManager, IPlaybackManager playbackManager, ITheaterConfigurationManager config, IIsoManager isoManager, IUserInputManager inputManager, IZipClient zipClient, IHttpClient httpClient, IConnectionManager connectionManager)
        {
            _logger = logManager.GetLogger("InternalDirectShowPlayer");
            _hiddenWindow = hiddenWindow;
            _presentation = presentation;
            _sessionManager = sessionManager;
            _httpClient = httpClient;
            _connectionManager = connectionManager;
            _playbackManager = playbackManager;
            _config = config;
            _isoManager = isoManager;
            _inputManager = inputManager;
            _zipClient = zipClient;

            _config.Configuration.InternalPlayerConfiguration.VideoConfig.SetDefaults();
            _config.Configuration.InternalPlayerConfiguration.AudioConfig.SetDefaults();
            _config.Configuration.InternalPlayerConfiguration.SubtitleConfig.SetDefaults();
            _config.Configuration.InternalPlayerConfiguration.COMConfig.SetDefaults();

            //use a static object so we keep the libraries in the same place. Doesn't usually matter, but the EVR Presenter does some COM hooking that has problems if we change the lib address.
            //if (_privateCom == null)
            //    _privateCom = new URCOMLoader(_config, _zipClient);
            URCOMLoader.Instance.Initialize(_config, _zipClient, logManager);

            EnsureMediaFilters();
        }
        //public URCOMLoader PrivateCom
        //{
        //    get
        //    {
        //        return _privateCom;
        //    }
        //}

        public InternalDirectShowPlayer(
            ILogManager logManager
            , MainBaseForm hostForm
            //, IPresentationManager presentation
            //, ISessionManager sessionManager
            , IApplicationPaths appPaths
            , IIsoManager isoManager
            //, IUserInputManager inputManager
            , IZipClient zipClient
            , IHttpClient httpClient, IConfigurationManager configurationManager)
        {
            _logger = logManager.GetLogger("InternalDirectShowPlayer");
            _hostForm = hostForm;
            //_presentation = presentation;
            //_sessionManager = sessionManager;
            _httpClient = httpClient;
            _config = configurationManager;
            _isoManager = isoManager;
            //_inputManager = inputManager;
            _zipClient = zipClient;

            var config = GetConfiguration();

            config.VideoConfig.SetDefaults();
            config.AudioConfig.SetDefaults();
            config.SubtitleConfig.SetDefaults();
            config.COMConfig.SetDefaults();

            //use a static object so we keep the libraries in the same place. Doesn't usually matter, but the EVR Presenter does some COM hooking that has problems if we change the lib address.
            //if (_privateCom == null)
            //    _privateCom = new URCOMLoader(_config, _zipClient);
            URCOMLoader.Instance.Initialize(appPaths.ProgramDataPath, _zipClient, logManager, configurationManager);

            EnsureMediaFilters(appPaths.ProgramDataPath);
        }
        public static void EnsureObjects(ITheaterConfigurationManager mbtConfig, bool block, IZipClient zipClient)
        {
            try
            {
                string objPath = Path.Combine(mbtConfig.CommonApplicationPaths.ProgramDataPath, OJB_FOLDER);
                string lastCheckedPath = Path.Combine(objPath, LAST_CHECKED);
                bool needsCheck = true;

                if (!Directory.Exists(objPath))
                {
                    Directory.CreateDirectory(objPath);
                }

                DateAndVersion lastCheck = new DateAndVersion(lastCheckedPath);
                if (lastCheck.StoredDate.AddDays(7) > DateTime.Now)
                    needsCheck = false;
                if (lastCheck.VersionNumber != ExeVersion)
                    needsCheck = true;

                if (needsCheck)
                {
                    if (block)
                        CheckObjects(objPath, zipClient);
                    else
                        ThreadPool.QueueUserWorkItem(o => CheckObjects(o, zipClient), objPath);
                }
            }
            catch (Exception ex)
            {

            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PismoIsoManager" /> class.
 /// </summary>
 public PismoIsoManager(ILogger logger, IHttpClient httpClient, IApplicationPaths appPaths, IZipClient zipClient)
 {
     _logger = logger;
     _httpClient = httpClient;
     _appPaths = appPaths;
     _zipClient = zipClient;
 }
 public FFMpegDownloader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient)
 {
     _logger = logger;
     _appPaths = appPaths;
     _httpClient = httpClient;
     _zipClient = zipClient;
 }
Beispiel #9
0
 public TheTvDbProvider(IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem, IServerApplicationPaths serverApplicationPaths)
 {
     _zipClient              = zipClient;
     _httpClient             = httpClient;
     _fileSystem             = fileSystem;
     _serverApplicationPaths = serverApplicationPaths;
 }
Beispiel #10
0
        public MediaEncoder(ILogger logger, IJsonSerializer jsonSerializer, string ffMpegPath, string ffProbePath, bool hasExternalEncoder, IServerConfigurationManager configurationManager, IFileSystem fileSystem, ILiveTvManager liveTvManager, IIsoManager isoManager, ILibraryManager libraryManager, IChannelManager channelManager, ISessionManager sessionManager, Func <ISubtitleEncoder> subtitleEncoder, Func <IMediaSourceManager> mediaSourceManager, IHttpClient httpClient, IZipClient zipClient, IProcessFactory processFactory,
                            int defaultImageExtractionTimeoutMs,
                            bool enableEncoderFontFile, IEnvironmentInfo environmentInfo)
        {
            _logger                         = logger;
            _jsonSerializer                 = jsonSerializer;
            ConfigurationManager            = configurationManager;
            FileSystem                      = fileSystem;
            LiveTvManager                   = liveTvManager;
            IsoManager                      = isoManager;
            LibraryManager                  = libraryManager;
            ChannelManager                  = channelManager;
            SessionManager                  = sessionManager;
            SubtitleEncoder                 = subtitleEncoder;
            MediaSourceManager              = mediaSourceManager;
            _httpClient                     = httpClient;
            _zipClient                      = zipClient;
            _processFactory                 = processFactory;
            DefaultImageExtractionTimeoutMs = defaultImageExtractionTimeoutMs;
            EnableEncoderFontFile           = enableEncoderFontFile;
            _environmentInfo                = environmentInfo;
            FFProbePath                     = ffProbePath;
            FFMpegPath                      = ffMpegPath;
            _originalFFProbePath            = ffProbePath;
            _originalFFMpegPath             = ffMpegPath;

            _hasExternalEncoder = hasExternalEncoder;

            SetEnvironmentVariable();
        }
 public PismoInstaller(IHttpClient httpClient, ILogger logger, IApplicationPaths appPaths, IZipClient zipClient)
 {
     _httpClient = httpClient;
     _logger = logger;
     _appPaths = appPaths;
     _zipClient = zipClient;
 }
Beispiel #12
0
        public InternalDirectShowPlayer(ILogManager logManager, IHiddenWindow hiddenWindow, IPresentationManager presentation, ISessionManager sessionManager, IPlaybackManager playbackManager, ITheaterConfigurationManager config, IIsoManager isoManager, IUserInputManager inputManager, IZipClient zipClient, IHttpClient httpClient, IConnectionManager connectionManager)
        {
            _logger            = logManager.GetLogger("InternalDirectShowPlayer");
            _hiddenWindow      = hiddenWindow;
            _presentation      = presentation;
            _sessionManager    = sessionManager;
            _httpClient        = httpClient;
            _connectionManager = connectionManager;
            _playbackManager   = playbackManager;
            _config            = config;
            _isoManager        = isoManager;
            _inputManager      = inputManager;
            _zipClient         = zipClient;

            _config.Configuration.InternalPlayerConfiguration.VideoConfig.SetDefaults();
            _config.Configuration.InternalPlayerConfiguration.AudioConfig.SetDefaults();
            _config.Configuration.InternalPlayerConfiguration.SubtitleConfig.SetDefaults();
            _config.Configuration.InternalPlayerConfiguration.COMConfig.SetDefaults();

            //use a static object so we keep the libraries in the same place. Doesn't usually matter, but the EVR Presenter does some COM hooking that has problems if we change the lib address.
            if (_privateCom == null)
            {
                _privateCom = new URCOMLoader(_config, _zipClient);
            }

            EnsureMediaFilters();
        }
Beispiel #13
0
        public InstallationManager(
            ILoggerFactory loggerFactory,
            IApplicationHost appHost,
            IApplicationPaths appPaths,
            IHttpClient httpClient,
            IJsonSerializer jsonSerializer,
            IServerConfigurationManager config,
            IFileSystem fileSystem,
            ICryptoProvider cryptographyProvider,
            IZipClient zipClient,
            string packageRuntime)
        {
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            CurrentInstallations           = new List <Tuple <InstallationInfo, CancellationTokenSource> >();
            CompletedInstallationsInternal = new ConcurrentBag <InstallationInfo>();

            _applicationHost      = appHost;
            _appPaths             = appPaths;
            _httpClient           = httpClient;
            _jsonSerializer       = jsonSerializer;
            _config               = config;
            _fileSystem           = fileSystem;
            _cryptographyProvider = cryptographyProvider;
            _zipClient            = zipClient;
            _packageRuntime       = packageRuntime;
            _logger               = loggerFactory.CreateLogger(nameof(InstallationManager));
        }
Beispiel #14
0
        public InternalDirectShowPlayer(
            ILogManager logManager
            //, IPresentationManager presentation
            //, ISessionManager sessionManager
            , IApplicationPaths appPaths
            , IIsoManager isoManager
            //, IUserInputManager inputManager
            , IZipClient zipClient
            , IHttpClient httpClient, IConfigurationManager configurationManager, Dispatcher dispatcher)
        {
            _logger = logManager.GetLogger("InternalDirectShowPlayer");
            //_presentation = presentation;
            //_sessionManager = sessionManager;
            _httpClient = httpClient;
            _config     = configurationManager;

            _dispatcher = dispatcher;
            _isoManager = isoManager;
            //_inputManager = inputManager;
            _zipClient = zipClient;
            _appPaths  = appPaths;

            //use a static object so we keep the libraries in the same place. Doesn't usually matter, but the EVR Presenter does some COM hooking that has problems if we change the lib address.
            //if (_privateCom == null)
            //    _privateCom = new URCOMLoader(_config, _zipClient);
            MediaFilterPath = URCOMLoader.Instance.Initialize(appPaths.ProgramDataPath, _zipClient, logManager, configurationManager);

            EnsureMediaFilters(appPaths.ProgramDataPath);
        }
Beispiel #15
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FFMpegManager" /> class.
        /// </summary>
        /// <param name="kernel">The kernel.</param>
        /// <param name="zipClient">The zip client.</param>
        /// <param name="jsonSerializer">The json serializer.</param>
        /// <param name="protobufSerializer">The protobuf serializer.</param>
        /// <param name="logger">The logger.</param>
        /// <exception cref="System.ArgumentNullException">zipClient</exception>
        public FFMpegManager(Kernel kernel, IZipClient zipClient, IJsonSerializer jsonSerializer, IProtobufSerializer protobufSerializer, ILogManager logManager, IServerApplicationPaths appPaths)
        {
            if (kernel == null)
            {
                throw new ArgumentNullException("kernel");
            }
            if (zipClient == null)
            {
                throw new ArgumentNullException("zipClient");
            }
            if (jsonSerializer == null)
            {
                throw new ArgumentNullException("jsonSerializer");
            }
            if (protobufSerializer == null)
            {
                throw new ArgumentNullException("protobufSerializer");
            }

            _kernel             = kernel;
            _zipClient          = zipClient;
            _jsonSerializer     = jsonSerializer;
            _protobufSerializer = protobufSerializer;
            _appPaths           = appPaths;
            _logger             = logManager.GetLogger("FFMpegManager");

            // Not crazy about this but it's the only way to suppress ffmpeg crash dialog boxes
            SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS | ErrorModes.SEM_NOALIGNMENTFAULTEXCEPT | ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);

            VideoImageCache = new FileSystemRepository(VideoImagesDataPath);
            AudioImageCache = new FileSystemRepository(AudioImagesDataPath);
            SubtitleCache   = new FileSystemRepository(SubtitleCachePath);

            Task.Run(() => VersionedDirectoryPath = GetVersionedDirectoryPath());
        }
        public bool EnsureObjects(string appProgramDataPath, IZipClient zipClient)
        {
            bool needsRestart = false;

            try
            {
                string objPath = GetComObjectsFilterPath(appProgramDataPath);

                if (!Directory.Exists(objPath) || Directory.GetDirectories(objPath).Length == 0)
                {
                    Directory.CreateDirectory(objPath);
                    //extract embedded filters

                    ExtractBytes("LAV.zip", objPath, zipClient);
                    ExtractBytes("madVR.zip", objPath, zipClient);
                    ExtractBytes("mpaudio.zip", objPath, zipClient);
                    ExtractBytes("XySubFilter.zip", objPath, zipClient);
                    ExtractBytes("xy-VSFilter.zip", objPath, zipClient);
                }
            }
            catch (Exception ex)
            {
                _logger.Error("EnsureObjects Error: {0}", ex.Message);
            }

            _logger.Debug("EnsureObjects needsRestart: {0}", needsRestart);
            return(needsRestart);
        }
Beispiel #17
0
 private void ExtractBytes(byte[] comBin, string dlPath, IZipClient zipClient)
 {
     using (MemoryStream ms = new MemoryStream(comBin))
     {
         _logger.Debug("ExtractBytes: {0}", dlPath);
         zipClient.ExtractAll(ms, dlPath, true);
     }
 }
		public LinuxIsoManager(ILogger logger, IHttpClient httpClient, IApplicationPaths appPaths, IZipClient zipClient)
		{
			_logger = logger;
			_tmpPath = Path.DirectorySeparatorChar + "tmp" + Path.DirectorySeparatorChar + "mediabrowser";
			_mountELF = Path.DirectorySeparatorChar + "usr" + Path.DirectorySeparatorChar + "bin" + Path.DirectorySeparatorChar + "mount";
			_umountELF = Path.DirectorySeparatorChar + "usr" + Path.DirectorySeparatorChar + "bin" + Path.DirectorySeparatorChar + "umount";
			_sudoELF = Path.DirectorySeparatorChar + "usr" + Path.DirectorySeparatorChar + "bin" + Path.DirectorySeparatorChar + "sudo";
		}
 private void ExtractBytes(string filename, string dlPath, IZipClient zipClient)
 {
     using (var stream = GetType().Assembly.GetManifestResourceStream(GetType().Namespace + ".FilterZips." + filename))
     {
         _logger.Info("ExtractBytes: {0}", dlPath);
         zipClient.ExtractAll(stream, dlPath, true);
     }
 }
Beispiel #20
0
 public FontConfigLoader(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, IZipClient zipClient, IFileSystem fileSystem)
 {
     _httpClient = httpClient;
     _appPaths   = appPaths;
     _logger     = logger;
     _zipClient  = zipClient;
     _fileSystem = fileSystem;
 }
Beispiel #21
0
 public FontConfigLoader(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, IZipClient zipClient, IFileSystem fileSystem)
 {
     _httpClient = httpClient;
     _appPaths = appPaths;
     _logger = logger;
     _zipClient = zipClient;
     _fileSystem = fileSystem;
 }
Beispiel #22
0
 public XmlTvListingsProvider(IServerConfigurationManager config, IHttpClient httpClient, ILogger logger, IFileSystem fileSystem, IZipClient zipClient)
 {
     _config     = config;
     _httpClient = httpClient;
     _logger     = logger;
     _fileSystem = fileSystem;
     _zipClient  = zipClient;
 }
Beispiel #23
0
 private void ExtractBytes(byte[] comBin, string dlPath, IZipClient zipClient)
 {
     using (MemoryStream ms = new MemoryStream(comBin))
     {
         _logger.Debug("ExtractBytes: {0}", dlPath);
         zipClient.ExtractAll(ms, dlPath, true);
     }
 }
 public FFMpegDownloader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem)
 {
     _logger = logger;
     _appPaths = appPaths;
     _httpClient = httpClient;
     _zipClient = zipClient;
     _fileSystem = fileSystem;
 }
 public UpdatePluginTask(IApplicationPaths applicationPaths, IHttpClient httpClient,
                         IJsonSerializer jsonSerializer, ILogManager logManager, IZipClient zipClient)
 {
     _applicationPaths = applicationPaths;
     _httpClient       = httpClient;
     _jsonSerializer   = jsonSerializer;
     _logger           = logManager.CreateLogger <UpdatePluginTask>();
     _zipClient        = zipClient;
 }
 public ConfigurationPage(INavigationService nav, ITheaterConfigurationManager config, IPresentationManager presentation, IMediaFilters mediaFilters, IZipClient zipClient)
 {
     _nav = nav;
     _config = config;
     _presentation = presentation;
     _mediaFilters = mediaFilters;
     this._zipClient = zipClient;
     InitializeComponent();
 }
Beispiel #27
0
 public FFMpegDownloader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem, NativeEnvironment environment)
 {
     _logger = logger;
     _appPaths = appPaths;
     _httpClient = httpClient;
     _zipClient = zipClient;
     _fileSystem = fileSystem;
     _environment = environment;
 }
Beispiel #28
0
        private static void CheckObjects(object objDlPath, IZipClient zipClient)
        {
            try
            {
                Uri    objManifest     = new Uri(Path.Combine(System.Configuration.ConfigurationSettings.AppSettings["PrivateObjectsManifest"], "manifest.txt"));
                string dlPath          = objDlPath.ToString();
                string lastCheckedPath = Path.Combine(dlPath, LAST_CHECKED);

                using (WebClient mwc = new WebClient())
                {
                    string dlList = mwc.DownloadString(objManifest);
                    if (!string.IsNullOrWhiteSpace(dlList))
                    {
                        string[] objToCheck = dlList.Split(new string[] { System.Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
                        foreach (string toCheck in objToCheck)
                        {
                            string         txtPath    = Path.Combine(dlPath, Path.ChangeExtension(toCheck, "txt"));
                            DateAndVersion lastUpdate = new DateAndVersion(txtPath);
                            Uri            comPath    = new Uri(Path.Combine(Path.Combine(System.Configuration.ConfigurationSettings.AppSettings["PrivateObjectsManifest"], toCheck)));
                            WebRequest     request    = WebRequest.Create(comPath);
                            request.Method = "HEAD";

                            using (WebResponse wr = request.GetResponse())
                            {
                                DateTime lmDate;
                                if (DateTime.TryParse(wr.Headers[HttpResponseHeader.LastModified], out lmDate))
                                {
                                    if (lmDate > lastUpdate.StoredDate)
                                    {
                                        //download the updated component
                                        using (WebClient fd = new WebClient())
                                        {
                                            fd.DownloadProgressChanged += fd_DownloadProgressChanged;
                                            byte[] comBin = fd.DownloadData(comPath);
                                            if (comBin.Length > 0)
                                            {
                                                using (MemoryStream ms = new MemoryStream(comBin))
                                                {
                                                    zipClient.ExtractAll(ms, dlPath, true);
                                                }

                                                DateAndVersion.Write(new DateAndVersion(txtPath, lmDate, ExeVersion));
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                DateAndVersion.Write(new DateAndVersion(lastCheckedPath, DateTime.Now, ExeVersion));
            }
            catch (Exception ex)
            {
            }
        }
 public ShowProgressCalculator(IUserManager userManager, ILibraryManager libraryManager, IUserDataManager userDataManager, IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem, IServerApplicationPaths serverApplicationPaths, User user = null)
     : base(userManager, libraryManager, userDataManager)
 {
     _zipClient              = zipClient;
     _httpClient             = httpClient;
     _fileSystem             = fileSystem;
     _serverApplicationPaths = serverApplicationPaths;
     User = user;
 }
Beispiel #30
0
 public FFMpegLoader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem, FFMpegInstallInfo ffmpegInstallInfo)
 {
     _logger            = logger;
     _appPaths          = appPaths;
     _httpClient        = httpClient;
     _zipClient         = zipClient;
     _fileSystem        = fileSystem;
     _ffmpegInstallInfo = ffmpegInstallInfo;
 }
Beispiel #31
0
 public TheTvDbProvider(IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem,
                        IMemoryStreamFactory memoryStreamProvider, IServerApplicationPaths serverApplicationPaths)
 {
     _zipClient              = zipClient;
     _httpClient             = httpClient;
     _fileSystem             = fileSystem;
     _memoryStreamProvider   = memoryStreamProvider;
     _serverApplicationPaths = serverApplicationPaths;
 }
 public TvdbSeriesProvider(IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem, IServerConfigurationManager config, ILogger logger)
 {
     _zipClient  = zipClient;
     _httpClient = httpClient;
     _fileSystem = fileSystem;
     _config     = config;
     _logger     = logger;
     Current     = this;
 }
Beispiel #33
0
 public ConfigurationPage(INavigationService nav, ITheaterConfigurationManager config, IPresentationManager presentation, IMediaFilters mediaFilters, IZipClient zipClient)
 {
     _nav            = nav;
     _config         = config;
     _presentation   = presentation;
     _mediaFilters   = mediaFilters;
     this._zipClient = zipClient;
     InitializeComponent();
 }
Beispiel #34
0
        public URCOMLoader(ITheaterConfigurationManager mbtConfig, IZipClient zipClient)
        {
            //this should be called on app load, but this will make sure it gets done.
            URCOMLoader.EnsureObjects(mbtConfig, true, zipClient);

            _knownObjects    = mbtConfig.Configuration.InternalPlayerConfiguration.COMConfig.FilterList;
            SearchPath       = Path.Combine(mbtConfig.CommonApplicationPaths.ProgramDataPath, OJB_FOLDER);
            _preferURObjects = mbtConfig.Configuration.InternalPlayerConfiguration.UsePrivateObjects;
        }
Beispiel #35
0
 public FFMpegLoader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem, NativeEnvironment environment, FFMpegInstallInfo ffmpegInstallInfo)
 {
     _logger = logger;
     _appPaths = appPaths;
     _httpClient = httpClient;
     _zipClient = zipClient;
     _fileSystem = fileSystem;
     _environment = environment;
     _ffmpegInstallInfo = ffmpegInstallInfo;
 }
Beispiel #36
0
 public FFMpegLoader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem, NativeEnvironment environment, Assembly ownerAssembly, FFMpegInstallInfo ffmpegInstallInfo)
 {
     _logger            = logger;
     _appPaths          = appPaths;
     _httpClient        = httpClient;
     _zipClient         = zipClient;
     _fileSystem        = fileSystem;
     _environment       = environment;
     _ownerAssembly     = ownerAssembly;
     _ffmpegInstallInfo = ffmpegInstallInfo;
 }
Beispiel #37
0
 public DirectShowPlayerBridge(ILogManager logManager
                               , IApplicationPaths appPaths
                               , IIsoManager isoManager
                               , IZipClient zipClient
                               , IHttpClient httpClient,
                               IConfigurationManager configurationManager, IJsonSerializer json, Dispatcher context)
 {
     _json   = json;
     _logger = logManager.GetLogger("DirectShowPlayerBridge");
     _player = new InternalDirectShowPlayer(logManager, appPaths, isoManager, zipClient, httpClient, configurationManager, context);
 }
Beispiel #38
0
 public UpdateService(IFileSystem fileSystem, IHttpClient httpClient, IZipClient zipClient, IJsonSerializer jsonSerializer, IApplicationPaths appPaths, ILogger logger)
 {
     this.fileSystem     = fileSystem;
     this.httpClient     = httpClient;
     this.zipClient      = zipClient;
     this.jsonSerializer = jsonSerializer;
     this.appPaths       = appPaths;
     this.logger         = logger;
     client = new HttpClient(new JsProxyHttpClientHandler());
     client.DefaultRequestHeaders.UserAgent.TryParseAdd($"JavScraper v{Assembly.GetExecutingAssembly().GetName().Version}");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RemoteSeriesProvider" /> class.
 /// </summary>
 /// <param name="httpClient">The HTTP client.</param>
 /// <param name="logManager">The log manager.</param>
 /// <param name="configurationManager">The configuration manager.</param>
 /// <param name="zipClient">The zip client.</param>
 /// <exception cref="System.ArgumentNullException">httpClient</exception>
 public RemoteSeriesProvider(IHttpClient httpClient, ILogManager logManager, IServerConfigurationManager configurationManager, IZipClient zipClient)
     : base(logManager, configurationManager)
 {
     if (httpClient == null)
     {
         throw new ArgumentNullException("httpClient");
     }
     HttpClient = httpClient;
     _zipClient = zipClient;
     Current    = this;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RemoteSeriesProvider" /> class.
 /// </summary>
 /// <param name="httpClient">The HTTP client.</param>
 /// <param name="logManager">The log manager.</param>
 /// <param name="configurationManager">The configuration manager.</param>
 /// <param name="zipClient">The zip client.</param>
 /// <exception cref="System.ArgumentNullException">httpClient</exception>
 public RemoteSeriesProvider(IHttpClient httpClient, ILogManager logManager, IServerConfigurationManager configurationManager, IZipClient zipClient)
     : base(logManager, configurationManager)
 {
     if (httpClient == null)
     {
         throw new ArgumentNullException("httpClient");
     }
     HttpClient = httpClient;
     _zipClient = zipClient;
     Current = this;
 }
Beispiel #41
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MediaEncoder" /> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="zipClient">The zip client.</param>
        /// <param name="appPaths">The app paths.</param>
        /// <param name="jsonSerializer">The json serializer.</param>
        public MediaEncoder(ILogger logger, IZipClient zipClient, IApplicationPaths appPaths, IJsonSerializer jsonSerializer)
        {
            _logger = logger;
            _zipClient = zipClient;
            _appPaths = appPaths;
            _jsonSerializer = jsonSerializer;

            // Not crazy about this but it's the only way to suppress ffmpeg crash dialog boxes
            SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS | ErrorModes.SEM_NOALIGNMENTFAULTEXCEPT | ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);

            Task.Run(() => VersionedDirectoryPath = GetVersionedDirectoryPath());
        }
Beispiel #42
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MediaEncoder" /> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="zipClient">The zip client.</param>
        /// <param name="appPaths">The app paths.</param>
        /// <param name="jsonSerializer">The json serializer.</param>
        public MediaEncoder(ILogger logger, IZipClient zipClient, IApplicationPaths appPaths, IJsonSerializer jsonSerializer)
        {
            _logger         = logger;
            _zipClient      = zipClient;
            _appPaths       = appPaths;
            _jsonSerializer = jsonSerializer;

            // Not crazy about this but it's the only way to suppress ffmpeg crash dialog boxes
            SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS | ErrorModes.SEM_NOALIGNMENTFAULTEXCEPT | ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);

            Task.Run(() => VersionedDirectoryPath = GetVersionedDirectoryPath());
        }
 public DirectShowPlayerBridge(ILogManager logManager
                               , MainBaseForm hostForm
                               , IApplicationPaths appPaths
                               , IIsoManager isoManager
                               , IZipClient zipClient
                               , IHttpClient httpClient,
                               IConfigurationManager configurationManager, IJsonSerializer json)
 {
     _json   = json;
     _logger = logManager.GetLogger("DirectShowPlayerBridge");
     _player = new InternalDirectShowPlayer(logManager, hostForm, appPaths, isoManager, zipClient, httpClient, configurationManager);
 }
 public DirectShowPlayerBridge(ILogManager logManager
     , MainBaseForm hostForm
     , IApplicationPaths appPaths
     , IIsoManager isoManager
     , IZipClient zipClient
     , IHttpClient httpClient,
     IConfigurationManager configurationManager, IJsonSerializer json)
 {
     _json = json;
     _logger = logManager.GetLogger("DirectShowPlayerBridge");
     _player = new InternalDirectShowPlayer(logManager, hostForm, appPaths, isoManager, zipClient, httpClient, configurationManager);
 }
Beispiel #45
0
        public static void EnsureObjects(ITheaterConfigurationManager mbtConfig, IZipClient zipClient, bool block, bool redownload)
        {
            try
            {
                string objPath         = Path.Combine(mbtConfig.CommonApplicationPaths.ProgramDataPath, OJB_FOLDER);
                string lastCheckedPath = Path.Combine(objPath, LAST_CHECKED);
                bool   needsCheck      = true;

                if (!Directory.Exists(objPath))
                {
                    Directory.CreateDirectory(objPath);
                }
                else if (redownload)
                {
                    foreach (string file in Directory.EnumerateFiles(objPath))
                    {
                        try
                        {
                            File.Delete(file);
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                }

                DateAndVersion lastCheck = new DateAndVersion(lastCheckedPath);
                if (lastCheck.StoredDate.AddDays(7) > DateTime.Now)
                {
                    needsCheck = false;
                }
                if (lastCheck.VersionNumber != ExeVersion)
                {
                    needsCheck = true;
                }

                if (needsCheck)
                {
                    if (block)
                    {
                        CheckObjects(objPath, zipClient, mbtConfig);
                    }
                    else
                    {
                        ThreadPool.QueueUserWorkItem(o => CheckObjects(o, zipClient, mbtConfig), objPath);
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
 public InternalDirectShowPlayer(ILogManager logManager, IHiddenWindow hiddenWindow, IPresentationManager presentation, ISessionManager sessionManager, IApiClient apiClient, IPlaybackManager playbackManager, ITheaterConfigurationManager config, IIsoManager isoManager, IUserInputManager inputManager, IZipClient zipClient, IHttpClient httpClient)
 {
     _logger = logManager.GetLogger("InternalDirectShowPlayer");
     _hiddenWindow = hiddenWindow;
     _presentation = presentation;
     _sessionManager = sessionManager;
     _apiClient = apiClient;
     _httpClient = httpClient;
     _playbackManager = playbackManager;
     _config = config;
     _isoManager = isoManager;
     _inputManager = inputManager;
     _zipClient = zipClient;
 }
Beispiel #47
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseStreamingService" /> class.
 /// </summary>
 protected BaseStreamingService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer)
 {
     JsonSerializer = jsonSerializer;
     ZipClient = zipClient;
     MediaSourceManager = mediaSourceManager;
     DeviceManager = deviceManager;
     SubtitleEncoder = subtitleEncoder;
     DlnaManager = dlnaManager;
     FileSystem = fileSystem;
     ServerConfigurationManager = serverConfig;
     UserManager = userManager;
     LibraryManager = libraryManager;
     IsoManager = isoManager;
     MediaEncoder = mediaEncoder;
 }
Beispiel #48
0
        public MediaEncoder(ILogger logger, IJsonSerializer jsonSerializer, string ffMpegPath, string ffProbePath, bool hasExternalEncoder, IServerConfigurationManager configurationManager, IFileSystem fileSystem, ILiveTvManager liveTvManager, IIsoManager isoManager, ILibraryManager libraryManager, IChannelManager channelManager, ISessionManager sessionManager, Func<ISubtitleEncoder> subtitleEncoder, Func<IMediaSourceManager> mediaSourceManager, IHttpClient httpClient, IZipClient zipClient)
        {
            _logger = logger;
            _jsonSerializer = jsonSerializer;
            ConfigurationManager = configurationManager;
            FileSystem = fileSystem;
            LiveTvManager = liveTvManager;
            IsoManager = isoManager;
            LibraryManager = libraryManager;
            ChannelManager = channelManager;
            SessionManager = sessionManager;
            SubtitleEncoder = subtitleEncoder;
            MediaSourceManager = mediaSourceManager;
            _httpClient = httpClient;
            _zipClient = zipClient;
            FFProbePath = ffProbePath;
            FFMpegPath = ffMpegPath;

            _hasExternalEncoder = hasExternalEncoder;
        }
        private static void CheckObjects(object objDlPath, IZipClient zipClient)
        {
            try
            {
                Uri objManifest = new Uri(Path.Combine(System.Configuration.ConfigurationSettings.AppSettings["PrivateObjectsManifest"], "manifest.txt"));
                string dlPath = objDlPath.ToString();
                string lastCheckedPath = Path.Combine(dlPath, LAST_CHECKED);

                using (WebClient mwc = new WebClient())
                {
                    string dlList = mwc.DownloadString(objManifest);
                    if (!string.IsNullOrWhiteSpace(dlList))
                    {
                        string[] objToCheck = dlList.Split(new string[] { System.Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
                        foreach (string toCheck in objToCheck)
                        {
                            string txtPath = Path.Combine(dlPath, Path.ChangeExtension(toCheck, "txt"));
                            DateAndVersion lastUpdate = new DateAndVersion(txtPath);
                            Uri comPath = new Uri(Path.Combine(Path.Combine(System.Configuration.ConfigurationSettings.AppSettings["PrivateObjectsManifest"], toCheck)));
                            WebRequest request = WebRequest.Create(comPath);
                            request.Method = "HEAD";

                            using (WebResponse wr = request.GetResponse())
                            {
                                DateTime lmDate;
                                if (DateTime.TryParse(wr.Headers[HttpResponseHeader.LastModified], out lmDate))
                                {
                                    if (lmDate > lastUpdate.StoredDate)
                                    {
                                        //download the updated component
                                        using (WebClient fd = new WebClient())
                                        {
                                            fd.DownloadProgressChanged += fd_DownloadProgressChanged;
                                            byte[] comBin = fd.DownloadData(comPath);
                                            if (comBin.Length > 0)
                                            {
                                                using (MemoryStream ms = new MemoryStream(comBin))
                                                {
                                                    zipClient.ExtractAll(ms, dlPath, true);
                                                }

                                                DateAndVersion.Write(new DateAndVersion(txtPath, lmDate, ExeVersion));
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                DateAndVersion.Write(new DateAndVersion(lastCheckedPath, DateTime.Now, ExeVersion));
            }
            catch (Exception ex)
            {
            }
        }
 public bool EnsureObjects(string appProgramDataPath, IZipClient zipClient, bool block)
 {
     return EnsureObjects(appProgramDataPath, zipClient, block, false);
 }
 public DirectShowPlayer(ILogger logger, IHiddenWindow hiddenWindow, InternalDirectShowPlayer playerWrapper,
     IntPtr applicationWindowHandle, ISessionManager sessionManager, ITheaterConfigurationManager mbtConfig,
     IUserInputManager input, IApiClient apiClient,  IZipClient zipClient, IHttpClient httpClient)
 {
     _logger = logger;
     _hiddenWindow = hiddenWindow;
     _playerWrapper = playerWrapper;
     _applicationWindowHandle = applicationWindowHandle;
     _sessionManager = sessionManager;
     _httpClient = httpClient;
     _input = input;
     _input.KeyDown += HiddenForm_KeyDown;
     //_input.
     _mbtConfig = mbtConfig;
     _apiClient = apiClient;
 }
 protected BaseProgressiveStreamingService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IImageProcessor imageProcessor, IHttpClient httpClient) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer)
 {
     ImageProcessor = imageProcessor;
     HttpClient = httpClient;
 }
        public URCOMLoader(ITheaterConfigurationManager mbtConfig, IZipClient zipClient)
        {
            //this should be called on app load, but this will make sure it gets done.
            URCOMLoader.EnsureObjects(mbtConfig, true, zipClient);

            _knownObjects = mbtConfig.Configuration.InternalPlayerConfiguration.COMConfig.FilterList;
            SearchPath = Path.Combine(mbtConfig.CommonApplicationPaths.ProgramDataPath, OJB_FOLDER);
            _preferURObjects = mbtConfig.Configuration.InternalPlayerConfiguration.UsePrivateObjects;
        }
Beispiel #54
0
 public VideoService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IImageProcessor imageProcessor, IHttpClient httpClient) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer, imageProcessor, httpClient)
 {
 }
Beispiel #55
0
        public bool EnsureObjects(ITheaterConfigurationManager mbtConfig, IZipClient zipClient, bool block, bool redownload)
        {
            bool needsRestart = false;

            try
            {
                _logger.Debug("EnsureObjects: block: {0} redownload: {1}", block, redownload);

                string objPath = Path.Combine(mbtConfig.CommonApplicationPaths.ProgramDataPath, OJB_FOLDER);
                string lastCheckedPath = Path.Combine(objPath, LAST_CHECKED);
                bool needsCheck = true;

                if (!Directory.Exists(objPath) || Directory.GetDirectories(objPath).Length == 0)
                {
                    Directory.CreateDirectory(objPath);
                    //extract embedded filters
                    ExtractBytes(MediaBrowser.Theater.DirectShow.Properties.Resources.babgvant, objPath, zipClient);
                    ExtractBytes(MediaBrowser.Theater.DirectShow.Properties.Resources.LAV, objPath, zipClient);
                    ExtractBytes(MediaBrowser.Theater.DirectShow.Properties.Resources.madVR, objPath, zipClient);
                    ExtractBytes(MediaBrowser.Theater.DirectShow.Properties.Resources.mpaudio, objPath, zipClient);
                    ExtractBytes(MediaBrowser.Theater.DirectShow.Properties.Resources.XySubFilter, objPath, zipClient);
                    ExtractBytes(MediaBrowser.Theater.DirectShow.Properties.Resources.xy_VSFilter, objPath, zipClient);
                }
                else if (redownload)
                {
                    needsRestart = _libsLoaded.Count > 0;

                    foreach (string file in Directory.EnumerateFiles(objPath))
                    {
                        try
                        {
                            //deleting these files will force a redownload later
                            _logger.Debug("EnsureObjects Delete: {0}", file);
                            File.Delete(file);
                        }
                        catch (Exception ex)
                        {
                            _logger.Error("EnsureObjects DeleteError: {0}", ex.Message);
                        }
                    }
                }

                if (!needsRestart)
                {
                    //we can only update the files if no handles are held
                    DateAndVersion lastCheck = new DateAndVersion(lastCheckedPath);
                    if (lastCheck.StoredDate.AddDays(7) > DateTime.Now)
                        needsCheck = false;
                    if (lastCheck.VersionNumber != ExeVersion)
                        needsCheck = true;

                    _logger.Debug("EnsureObjects needsCheck: {0}", needsCheck);

                    if (needsCheck)
                    {
                        if (block)
                            CheckObjects(objPath, zipClient, mbtConfig);
                        else
                            ThreadPool.QueueUserWorkItem(o => CheckObjects(o, zipClient, mbtConfig), objPath);
                    }
                }
            }
            catch (Exception ex)
            {
                _logger.Error("EnsureObjects Error: {0}", ex.Message);
            }

            _logger.Debug("EnsureObjects needsRestart: {0}", needsRestart);
            return needsRestart;
        }
Beispiel #56
0
 public bool EnsureObjects(ITheaterConfigurationManager mbtConfig, IZipClient zipClient, bool block)
 {
     return EnsureObjects(mbtConfig, zipClient, block, false);
 }
Beispiel #57
0
        private void CheckObjects(object objDlPath, IZipClient zipClient, ITheaterConfigurationManager mbtConfig)
        {
            string dsDlPath = Path.Combine(System.Configuration.ConfigurationSettings.AppSettings["PrivateObjectsManifest"], mbtConfig.Configuration.InternalPlayerConfiguration.FilterSet);
            Uri objManifest = new Uri(Path.Combine(dsDlPath, "manifest.txt"));
                    
            //only check if we need to update filters if the CDN is available
            if (CanPing.TryPing(objManifest.Host))
            {
                try
                {
                    _mreFilterBlock.Reset();

                    string dlPath = objDlPath.ToString();
                    string lastCheckedPath = Path.Combine(dlPath, LAST_CHECKED);

                    _logger.Debug("CheckObjects lastCheckedPath: {0}", lastCheckedPath);

                    using (WebClient mwc = new WebClient())
                    {
                        string dlList = mwc.DownloadString(objManifest);
                        if (!string.IsNullOrWhiteSpace(dlList))
                        {
                            _logger.Debug("CheckObjects manifest: {0}", dlList);

                            string[] objToCheck = dlList.Split(new string[] { System.Environment.NewLine, "\n" }, StringSplitOptions.RemoveEmptyEntries);
                            foreach (string toCheck in objToCheck)
                            {
                                try
                                {
                                    string txtPath = Path.Combine(dlPath, Path.ChangeExtension(toCheck, "txt"));
                                    DateAndVersion lastUpdate = new DateAndVersion(txtPath);
                                    Uri comPath = new Uri(Path.Combine(dsDlPath, toCheck));
                                    WebRequest request = WebRequest.Create(comPath);
                                    request.Method = "HEAD";

                                    _logger.Debug("CheckObjects check: {0}", comPath);

                                    using (WebResponse wr = request.GetResponse())
                                    {
                                        DateTime lmDate;
                                        if (DateTime.TryParse(wr.Headers[HttpResponseHeader.LastModified], out lmDate))
                                        {
                                            _logger.Debug("CheckObjects lmDate: {0} StoredDate", lmDate, lastUpdate.StoredDate);
                                            if (lmDate > lastUpdate.StoredDate)
                                            {
                                                //download the updated component
                                                using (WebClient fd = new WebClient())
                                                {
                                                    fd.DownloadProgressChanged += fd_DownloadProgressChanged;
                                                    byte[] comBin = fd.DownloadData(comPath);
                                                    if (comBin.Length > 0)
                                                    {
                                                        try
                                                        {
                                                            string dirPath = Path.Combine(dlPath, Path.GetFileNameWithoutExtension(toCheck));
                                                            if (Directory.Exists(dirPath))
                                                                Directory.Delete(dirPath, true);
                                                        }
                                                        catch (Exception ex)
                                                        {
                                                            _logger.Error("CheckObjects Delete: {0}", ex.Message);
                                                        }

                                                        ExtractBytes(comBin, dlPath, zipClient);
                                                        //using (MemoryStream ms = new MemoryStream(comBin))
                                                        //{
                                                        //    _logger.Debug("CheckObjects extract: {0}", dlPath);
                                                        //    zipClient.ExtractAll(ms, dlPath, true);
                                                        //}

                                                        DateAndVersion.Write(new DateAndVersion(txtPath, lmDate, ExeVersion));
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                                catch (Exception ex)
                                {
                                    Debug.WriteLine(ex.Message);
                                }
                            }
                        }
                    }

                    DateAndVersion.Write(new DateAndVersion(lastCheckedPath, DateTime.Now, ExeVersion));
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                }
                finally
                {
                    _mreFilterBlock.Set();
                }
            }
        }
Beispiel #58
0
        public void Initialize(ITheaterConfigurationManager mbtConfig, IZipClient zipClient, ILogManager logManager)
        {
            if (!_initialized)
            {
                _mbtConfig = mbtConfig;
                _knownObjects = mbtConfig.Configuration.InternalPlayerConfiguration.COMConfig.FilterList;
                SearchPath = Path.Combine(mbtConfig.CommonApplicationPaths.ProgramDataPath, OJB_FOLDER);
                _preferURObjects = mbtConfig.Configuration.InternalPlayerConfiguration.UsePrivateObjects;
                _logger = logManager.GetLogger("URCOMLoader"); ;

                _logger.Debug("URCOMLoader Initialized");

                _initialized = true;
            }
        }
Beispiel #59
0
 public DynamicHlsService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, INetworkManager networkManager)
     : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer)
 {
     NetworkManager = networkManager;
 }
        public void Initialize(string appProgramDataPath, IZipClient zipClient, ILogManager logManager, IConfigurationManager configurationManager)
        {
            if (!_initialized)
            {
                _configurationManager = configurationManager;
                var config = GetConfiguration();

                _knownObjects = config.COMConfig.FilterList;
                SearchPath = Path.Combine(appProgramDataPath, OJB_FOLDER);
                _preferURObjects = config.UsePrivateObjects;
                _logger = logManager.GetLogger("URCOMLoader"); ;

                _logger.Debug("URCOMLoader Initialized");

                _initialized = true;
            }
        }