DistanceLimits

This commit is contained in:
2023-02-25 23:01:08 -07:00
parent db43eb5459
commit 0f025b5e2e
26 changed files with 426 additions and 392 deletions

@ -10,16 +10,18 @@ public class MappingFromItem : Properties.IMappingFromItem
public int Id { init; get; }
public FileHolder ImageFileHolder { init; get; }
public bool? IsWrongYear { init; get; }
public bool IsIgnoreRelativePath { init; get; }
public DateTime MinimumDateTime { init; get; }
public string RelativePath { init; get; }
public FileHolder ResizedFileHolder { init; get; }
[JsonConstructor]
public MappingFromItem(DateTime[] containerDateTimes, int id, FileHolder imageFileHolder, bool? isWrongYear, DateTime minimumDateTime, string relativePath, FileHolder resizedFileHolder)
public MappingFromItem(DateTime[] containerDateTimes, int id, FileHolder imageFileHolder, bool isIgnoreRelativePath, bool? isWrongYear, DateTime minimumDateTime, string relativePath, FileHolder resizedFileHolder)
{
ContainerDateTimes = containerDateTimes;
Id = id;
ImageFileHolder = imageFileHolder;
IsIgnoreRelativePath = isIgnoreRelativePath;
IsWrongYear = isWrongYear;
MinimumDateTime = minimumDateTime;
RelativePath = relativePath;
@ -32,7 +34,7 @@ public class MappingFromItem : Properties.IMappingFromItem
return result;
}
internal static MappingFromItem GetMappingFromItem(DateTime[] containerDateTimes, Item item, FileHolder? resizedFileHolder)
internal static MappingFromItem GetMappingFromItem(DateTime[] containerDateTimes, Item item, FileHolder? resizedFileHolder, bool isIgnoreRelativePath)
{
MappingFromItem result;
bool? isWrongYear;
@ -43,7 +45,7 @@ public class MappingFromItem : Properties.IMappingFromItem
throw new NotSupportedException();
minimumDateTime = Stateless.Methods.IProperty.GetMinimumDateTime(item.Property);
(isWrongYear, _) = item.Property.IsWrongYear(item.ImageFileHolder, minimumDateTime);
result = new(containerDateTimes, item.Property.Id.Value, item.ImageFileHolder, isWrongYear, minimumDateTime, item.RelativePath, resizedFileHolder);
result = new(containerDateTimes, item.Property.Id.Value, item.ImageFileHolder, isIgnoreRelativePath, isWrongYear, minimumDateTime, item.RelativePath, resizedFileHolder);
return result;
}