clean up null checks on CameraModel/LensModel
This commit is contained in:
parent
cdc2cb336d
commit
d52e8fce79
@ -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 = "<unk>";
|
||||
public string FNumber = "<unk>";
|
||||
public string ExposureTime = "<unk>";
|
||||
@ -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<string>? model;
|
||||
if (exifs.TryGetValue(ExifTag.Model, out model)) {
|
||||
CameraModel = model.Value;
|
||||
CameraModel = model.Value ?? "";
|
||||
}
|
||||
|
||||
IExifValue<string>? lensModel;
|
||||
if (exifs.TryGetValue(ExifTag.LensModel, out lensModel)) {
|
||||
LensModel = lensModel.Value;
|
||||
LensModel = lensModel.Value ?? "";
|
||||
}
|
||||
|
||||
IExifValue<Rational>? focalLength;
|
||||
|
Loading…
Reference in New Issue
Block a user