public VideoLibraryItem(VideoCollection processed) { Processed = processed; var barcodeConfig = processed.BarcodeConfigs.FirstOrDefault(); if (barcodeConfig == null) { return; } StandardBarcodeCreated = File.Exists(barcodeConfig.Barcode_Standard?.FullOutputFile); OnePixelBarcodeCreated = File.Exists(barcodeConfig.Barcode_1px?.FullOutputFile); ImagePath = StandardBarcodeCreated ? Path.GetDirectoryName(barcodeConfig.Barcode_Standard.FullOutputFile) : Path.GetDirectoryName(barcodeConfig.Barcode_1px.FullOutputFile); if (DateTime.TryParseExact(ImagePath.Split(' ').Last(), "yyyyMMdd_HHmmss", CultureInfo.CurrentCulture, DateTimeStyles.None, out DateTime runDate)) { RunDate = runDate.ToString("f"); } }
public void SetFullOutputFile(VideoCollection videoCollection) { FullOutputFile = Path.Combine(videoCollection.Config.FullOutputDirectory, OutputFilename); }