public VideoConfig(string file, Settings.CoreSettings settings) { try { if (!settings.AcceptedVideoFiles.Contains(Path.GetExtension(file).TrimStart('.'))) { IsValid = false; } else { MediaInfo fileInfo = VideoProcessor.GetVideoInfo(file); FullPath = file; DurationTimeSpan = fileInfo.Duration; if (string.IsNullOrEmpty(FileName) || string.IsNullOrEmpty(FilePath)) { IsValid = false; } else { OutputDirectory = $"{Path.GetFileNameWithoutExtension(file)} {DateTime.Now:yyyyMMdd_HHmmss}"; FullOutputDirectory = Path.Combine(settings.OutputDirectory, OutputDirectory); IsValid = true; } } } catch (Exception) { IsValid = false; } }
public VideoCollection(string file, Settings.CoreSettings settings) { Config = new VideoConfig(file, settings); BarcodeConfigs = new List <BarcodeConfig>(); Data = new VideoData(); }
public static void InitCaching(Settings.CoreSettings settings) { CacheProviderMongoDB.CreateDefaultInstance(settings); }