Removed IsIgnoreRelativePath

This commit is contained in:
2023-08-08 19:02:27 -07:00
parent 7a429de157
commit ed01d4996b
22 changed files with 70 additions and 187 deletions

View File

@ -213,6 +213,7 @@ internal class Property
string? model = null;
DateTime?[] dateTimes;
string dateTimeFormat;
string[]? tags = null;
DateTime checkDateTime;
DateTime? dateTime = null;
PropertyItem? propertyItem;
@ -334,6 +335,17 @@ internal class Property
orientation = value;
}
}
if (image.PropertyIdList.Contains((int)IExif.Tags.XPKeywords))
{
propertyItem = image.GetPropertyItem((int)IExif.Tags.XPKeywords);
if (propertyItem?.Value is not null)
{
if (propertyItem.Type == 2)
tags = asciiEncoding.GetString(propertyItem.Value).Trim('\0', ' ').Split(';');
else if (propertyItem.Type == 1)
tags = Encoding.Unicode.GetString(propertyItem.Value).Trim('\0', ' ').Split(';');
}
}
message = null;
dateTimes = new DateTime?[] { fileHolder.LastWriteTime, fileHolder.CreationTime, dateTime, dateTimeDigitized, dateTimeOriginal, gpsDateStamp };
}
@ -369,9 +381,9 @@ internal class Property
if (fileHolder.LastWriteTime is null && property?.LastWriteTime is null)
throw new NullReferenceException(nameof(fileHolder.LastWriteTime));
if (fileHolder.CreationTime is not null && fileHolder.LastWriteTime is not null)
result = new(fileHolder.CreationTime.Value, dateTime, dateTimeDigitized, dateTimeFromName, dateTimeOriginalByLogic, fileLength, gpsDateStamp, height, id, fileHolder.LastWriteTime.Value, make, model, orientation, width);
result = new(fileHolder.CreationTime.Value, dateTime, dateTimeDigitized, dateTimeFromName, dateTimeOriginalByLogic, fileLength, gpsDateStamp, height, id, fileHolder.LastWriteTime.Value, make, model, orientation, tags, width);
else if (property is not null)
result = new(property.CreationTime, dateTime, dateTimeDigitized, dateTimeFromName, dateTimeOriginalByLogic, fileLength, gpsDateStamp, height, id, property.LastWriteTime, make, model, orientation, width);
result = new(property.CreationTime, dateTime, dateTimeDigitized, dateTimeFromName, dateTimeOriginalByLogic, fileLength, gpsDateStamp, height, id, property.LastWriteTime, make, model, orientation, tags, width);
else
throw new NullReferenceException(nameof(property));
return (message, dateTimesByLogic.ToArray(), result);