diff --git a/Program.cs b/Program.cs index 3d40259..6164b43 100644 --- a/Program.cs +++ b/Program.cs @@ -144,8 +144,8 @@ void main() { public class Photo { public string File; public bool Loaded = false; - public string? CameraModel; - public string? LensModel; + public string CameraModel = ""; + public string LensModel = ""; public string FocalLength = ""; public string FNumber = ""; public string ExposureTime = ""; @@ -166,15 +166,16 @@ public class Photo { ExifProfile? exifs = image.Metadata.ExifProfile; if (exifs != null) { // FIXME: handle Orientation + // FIXME: handle date shot / edited (and sort by shot date?) IExifValue? model; if (exifs.TryGetValue(ExifTag.Model, out model)) { - CameraModel = model.Value; + CameraModel = model.Value ?? ""; } IExifValue? lensModel; if (exifs.TryGetValue(ExifTag.LensModel, out lensModel)) { - LensModel = lensModel.Value; + LensModel = lensModel.Value ?? ""; } IExifValue? focalLength;