Exemplo n.º 1
0
        private IEnumerable <AbstractMediaMetaData> ProcessBatch(
            IMetaDataExtractor extractor,
            IEnumerable <string> files)
        {
            foreach (var file in files)
            {
                var metaData = extractor.Extract(file);

                var filename = Path.GetFileName(file);
                if (metaData == null)
                {
                    OnProgressEvent(filename, "Could not extract metadata", error: true);
                    continue;
                }

                OnProgressEvent(filename, $"Processing {filename}");
                yield return(metaData);
            }
        }