コード例 #1
0
 public PismoInstaller(IHttpClient httpClient, ILogger logger, IApplicationPaths appPaths, IZipClient zipClient)
 {
     _httpClient = httpClient;
     _logger     = logger;
     _appPaths   = appPaths;
     _zipClient  = zipClient;
 }
コード例 #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;
 }
コード例 #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));
        }
コード例 #4
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);
            URCOMLoader.Instance.Initialize(_config, _zipClient, logManager);

            EnsureMediaFilters();
        }
コード例 #5
0
        //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);
        }
コード例 #6
0
        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)
            {

            }
        }
コード例 #7
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;
 }
コード例 #8
0
 public FFMpegDownloader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient)
 {
     _logger = logger;
     _appPaths = appPaths;
     _httpClient = httpClient;
     _zipClient = zipClient;
 }
コード例 #9
0
 public TheTvDbProvider(IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem, IServerApplicationPaths serverApplicationPaths)
 {
     _zipClient              = zipClient;
     _httpClient             = httpClient;
     _fileSystem             = fileSystem;
     _serverApplicationPaths = serverApplicationPaths;
 }
コード例 #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();
        }
コード例 #11
0
 public PismoInstaller(IHttpClient httpClient, ILogger logger, IApplicationPaths appPaths, IZipClient zipClient)
 {
     _httpClient = httpClient;
     _logger = logger;
     _appPaths = appPaths;
     _zipClient = zipClient;
 }
コード例 #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();
        }
コード例 #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));
        }
コード例 #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);
        }
コード例 #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());
        }
コード例 #16
0
        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);
        }
コード例 #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);
     }
 }
コード例 #18
0
		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";
		}
コード例 #19
0
 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);
     }
 }
コード例 #20
0
 public FontConfigLoader(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, IZipClient zipClient, IFileSystem fileSystem)
 {
     _httpClient = httpClient;
     _appPaths   = appPaths;
     _logger     = logger;
     _zipClient  = zipClient;
     _fileSystem = fileSystem;
 }
コード例 #21
0
ファイル: FontConfigLoader.cs プロジェクト: softworkz/Emby
 public FontConfigLoader(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, IZipClient zipClient, IFileSystem fileSystem)
 {
     _httpClient = httpClient;
     _appPaths = appPaths;
     _logger = logger;
     _zipClient = zipClient;
     _fileSystem = fileSystem;
 }
コード例 #22
0
 public XmlTvListingsProvider(IServerConfigurationManager config, IHttpClient httpClient, ILogger logger, IFileSystem fileSystem, IZipClient zipClient)
 {
     _config     = config;
     _httpClient = httpClient;
     _logger     = logger;
     _fileSystem = fileSystem;
     _zipClient  = zipClient;
 }
コード例 #23
0
ファイル: URCOMLoader.cs プロジェクト: chandum2/Emby.Theater
 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);
     }
 }
コード例 #24
0
 public FFMpegDownloader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient, IFileSystem fileSystem)
 {
     _logger = logger;
     _appPaths = appPaths;
     _httpClient = httpClient;
     _zipClient = zipClient;
     _fileSystem = fileSystem;
 }
コード例 #25
0
 public UpdatePluginTask(IApplicationPaths applicationPaths, IHttpClient httpClient,
                         IJsonSerializer jsonSerializer, ILogManager logManager, IZipClient zipClient)
 {
     _applicationPaths = applicationPaths;
     _httpClient       = httpClient;
     _jsonSerializer   = jsonSerializer;
     _logger           = logManager.CreateLogger <UpdatePluginTask>();
     _zipClient        = zipClient;
 }
コード例 #26
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();
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #30
0
ファイル: FFMpegLoader.cs プロジェクト: vvuk/Emby
 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;
 }
コード例 #31
0
 public TheTvDbProvider(IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem,
                        IMemoryStreamFactory memoryStreamProvider, IServerApplicationPaths serverApplicationPaths)
 {
     _zipClient              = zipClient;
     _httpClient             = httpClient;
     _fileSystem             = fileSystem;
     _memoryStreamProvider   = memoryStreamProvider;
     _serverApplicationPaths = serverApplicationPaths;
 }
コード例 #32
0
 public TvdbSeriesProvider(IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem, IServerConfigurationManager config, ILogger logger)
 {
     _zipClient  = zipClient;
     _httpClient = httpClient;
     _fileSystem = fileSystem;
     _config     = config;
     _logger     = logger;
     Current     = this;
 }
コード例 #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();
 }
コード例 #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;
        }
コード例 #35
0
ファイル: FFMpegLoader.cs プロジェクト: softworkz/Emby
 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;
 }
コード例 #36
0
ファイル: FFMpegLoader.cs プロジェクト: waynus/Emby
 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;
 }
コード例 #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);
 }
コード例 #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}");
 }
コード例 #39
0
 /// <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;
 }
コード例 #40
0
 /// <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;
 }
コード例 #41
0
ファイル: MediaEncoder.cs プロジェクト: snap608/MediaBrowser
        /// <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());
        }
コード例 #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());
        }
コード例 #43
0
 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);
 }
コード例 #44
0
 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);
 }
コード例 #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)
            {
            }
        }
コード例 #46
0
 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;
 }
コード例 #47
0
ファイル: BaseStreamingService.cs プロジェクト: Cyrre/Emby
 /// <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;
 }
コード例 #48
0
ファイル: MediaEncoder.cs プロジェクト: 7illusions/Emby
        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;
        }
コード例 #49
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)
            {
            }
        }
コード例 #50
0
 public bool EnsureObjects(string appProgramDataPath, IZipClient zipClient, bool block)
 {
     return EnsureObjects(appProgramDataPath, zipClient, block, false);
 }
コード例 #51
0
 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;
 }
コード例 #52
0
 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;
 }
コード例 #53
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;
        }
コード例 #54
0
ファイル: VideoService.cs プロジェクト: rezafouladian/Emby
 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)
 {
 }
コード例 #55
0
ファイル: URCOMLoader.cs プロジェクト: chandum2/Emby.Theater
        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;
        }
コード例 #56
0
ファイル: URCOMLoader.cs プロジェクト: chandum2/Emby.Theater
 public bool EnsureObjects(ITheaterConfigurationManager mbtConfig, IZipClient zipClient, bool block)
 {
     return EnsureObjects(mbtConfig, zipClient, block, false);
 }
コード例 #57
0
ファイル: URCOMLoader.cs プロジェクト: chandum2/Emby.Theater
        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();
                }
            }
        }
コード例 #58
0
ファイル: URCOMLoader.cs プロジェクト: chandum2/Emby.Theater
        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;
            }
        }
コード例 #59
0
ファイル: DynamicHlsService.cs プロジェクト: RavenB/Emby
 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;
 }
コード例 #60
0
        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;
            }
        }