Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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);
 }