Exemplo n.º 1
0
        public Task <ItemUpdateType> FetchVideoInfo <T>(T item, MetadataRefreshOptions options, CancellationToken cancellationToken)
            where T : Video
        {
            if (item.VideoType == VideoType.Iso)
            {
                return(_cachedTask);
            }

            if (item.IsPlaceHolder)
            {
                return(_cachedTask);
            }

            if (!item.IsCompleteMedia)
            {
                return(_cachedTask);
            }

            if (item.IsVirtualItem)
            {
                return(_cachedTask);
            }

            // hack alert
            if (item.SourceType == SourceType.Channel && !_channelManager.EnableMediaProbe(item))
            {
                return(_cachedTask);
            }

            if (item.IsShortcut)
            {
                FetchShortcutInfo(item);
            }

            var prober = new FFProbeVideoInfo(_logger, _isoManager, _mediaEncoder, _itemRepo, _blurayExaminer, _localization, _appPaths, _json, _encodingManager, _fileSystem, _config, _subtitleManager, _chapterManager, _libraryManager);

            return(prober.ProbeVideo(item, options, cancellationToken));
        }