private static void AddFileType(Repository repository, IEnumerable <MetadataExtractor.Directory> directories) { MetadataExtractor.Formats.FileType.FileTypeDirectory fileTypeDirectory = directories.OfType <MetadataExtractor.Formats.FileType.FileTypeDirectory>().FirstOrDefault(); string fileType = fileTypeDirectory.GetDescription(MetadataExtractor.Formats.FileType.FileTypeDirectory.TagDetectedFileTypeName); string fileExtension = fileTypeDirectory.GetDescription(MetadataExtractor.Formats.FileType.FileTypeDirectory.TagExpectedFileNameExtension); repository.AddFileType(fileType, fileExtension); }
private static Boolean IsJpeg(IEnumerable <MetadataExtractor.Directory> directories) { Boolean jpegFound = false; MetadataExtractor.Formats.FileType.FileTypeDirectory fileTypeDirectory = directories.OfType <MetadataExtractor.Formats.FileType.FileTypeDirectory>().FirstOrDefault(); string fileType = fileTypeDirectory.GetDescription(MetadataExtractor.Formats.FileType.FileTypeDirectory.TagDetectedFileTypeName); if (fileType == "JPEG") { jpegFound = true; } return(jpegFound); }