public static List <VideoFile> Collect2(string courseRootPath) { var list = new List <VideoFile>(); foreach (var file in Directory.EnumerateFiles(courseRootPath, "*.mp4", SearchOption.AllDirectories)) { try { list.Add(VideoFile.CreateFromFullPath(file)); } catch (Exception ex) { Logger.Write($"Error parsing file->{file}. Exception:{ex}"); } } return(list); }
private static bool IsOutlineOrConclusion(VideoFile videoFile) { return(string.Compare(Path.GetFileNameWithoutExtension(videoFile.FileName.Lecture.Name), "outline", StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(Path.GetFileNameWithoutExtension(videoFile.FileName.Lecture.Name), "conclusion", StringComparison.OrdinalIgnoreCase) == 0); }