logger for !9
xmp and json sidecar support Alignment with Phares 8.0.118.14905 for Shared and Metadata A_Metadata Parameter constructors Removed force-property-last-write-time-to-creation-time House Cleaning
This commit is contained in:
@ -921,7 +921,7 @@ public partial class MapLogic : Shared.Models.Methods.IMapLogic
|
||||
return result;
|
||||
}
|
||||
|
||||
public void LookForAbandoned(Property.Models.Configuration propertyConfiguration, string bResultsFullGroupDirectory, ReadOnlyCollection<Container.Models.Container> readOnlyContainers, string cResultsFullGroupDirectory, string dResultsFullGroupDirectory, string d2ResultsFullGroupDirectory, Action? tick)
|
||||
public void LookForAbandoned(Property.Models.Configuration propertyConfiguration, string aResultsFullGroupDirectory, ReadOnlyCollection<Container.Models.Container> readOnlyContainers, string cResultsFullGroupDirectory, string dResultsFullGroupDirectory, string d2ResultsFullGroupDirectory, Action? tick)
|
||||
{
|
||||
string[] directories;
|
||||
string? directoryName;
|
||||
@ -929,7 +929,7 @@ public partial class MapLogic : Shared.Models.Methods.IMapLogic
|
||||
LookForAbandoned(propertyConfiguration, distinctFilteredIds);
|
||||
tick?.Invoke();
|
||||
List<string> distinctFilteredFileNameFirstSegments = Container.Models.Stateless.Methods.IContainer.GetFilteredDistinctFileNameFirstSegments(propertyConfiguration, readOnlyContainers);
|
||||
Stateless.LookForAbandonedLogic.LookForAbandoned(propertyConfiguration, bResultsFullGroupDirectory, distinctFilteredFileNameFirstSegments);
|
||||
Stateless.LookForAbandonedLogic.LookForAbandoned(propertyConfiguration, aResultsFullGroupDirectory, distinctFilteredFileNameFirstSegments);
|
||||
tick?.Invoke();
|
||||
directories = Directory.GetDirectories(cResultsFullGroupDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
foreach (string directory in directories)
|
||||
|
@ -64,20 +64,19 @@ internal abstract class FaceFileLogic
|
||||
exifDirectory = Metadata.Models.Stateless.Methods.IMetadata.GetExifDirectory(mappedFile.FilePath);
|
||||
RectangleF? rectangle = ILocation.GetPercentagesRectangle(configuration.LocationDigits, wholePercentages.Value);
|
||||
personDisplayDirectoryName = mappedFile.PersonDisplayDirectoryName is null ? configuration.MappingDefaultName : mappedFile.PersonDisplayDirectoryName;
|
||||
LocationContainer locationContainer = new(dateOnly,
|
||||
exifDirectory,
|
||||
mappedFile.DirectoryNumber,
|
||||
personDisplayDirectoryName,
|
||||
null,
|
||||
null,
|
||||
mappedFile.FilePath,
|
||||
fromDistanceContent,
|
||||
id.Value,
|
||||
null,
|
||||
null,
|
||||
mappedFile.PersonKey,
|
||||
rectangle,
|
||||
wholePercentages.Value);
|
||||
LocationContainer locationContainer = new(CreationDateOnly: dateOnly,
|
||||
ExifDirectory: exifDirectory,
|
||||
DirectoryNumber: mappedFile.DirectoryNumber,
|
||||
DisplayDirectoryName: personDisplayDirectoryName,
|
||||
Encoding: null,
|
||||
FaceFile: null,
|
||||
FilePath: mappedFile.FilePath,
|
||||
FromDistanceContent: fromDistanceContent,
|
||||
Id: id.Value,
|
||||
LengthPermyriad: null,
|
||||
LengthSource: null,
|
||||
PersonKey: mappedFile.PersonKey,
|
||||
WholePercentages: wholePercentages.Value);
|
||||
lock (locationContainers)
|
||||
locationContainers.Add(locationContainer);
|
||||
}
|
||||
@ -167,23 +166,19 @@ internal abstract class FaceFileLogic
|
||||
MoveUnableToMatch(filePath);
|
||||
return;
|
||||
}
|
||||
RectangleF? rectangle = ILocation.GetPercentagesRectangle(configuration.LocationDigits, wholePercentages.Value);
|
||||
if (rectangle is null)
|
||||
return;
|
||||
LocationContainer locationContainer = new(dateOnly,
|
||||
exifDirectory,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
faceFile,
|
||||
filePath,
|
||||
fromDistanceContent,
|
||||
filePath.Id.Value,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
rectangle,
|
||||
wholePercentages.Value);
|
||||
LocationContainer locationContainer = new(CreationDateOnly: dateOnly,
|
||||
ExifDirectory: exifDirectory,
|
||||
DirectoryNumber: null,
|
||||
DisplayDirectoryName: null,
|
||||
Encoding: null,
|
||||
FaceFile: faceFile,
|
||||
FilePath: filePath,
|
||||
FromDistanceContent: fromDistanceContent,
|
||||
Id: filePath.Id.Value,
|
||||
LengthPermyriad: null,
|
||||
LengthSource: null,
|
||||
PersonKey: null,
|
||||
WholePercentages: wholePercentages.Value);
|
||||
lock (locationContainers)
|
||||
locationContainers.Add(locationContainer);
|
||||
}
|
||||
|
@ -35,9 +35,9 @@ internal abstract class LookForAbandonedLogic
|
||||
}
|
||||
}
|
||||
|
||||
internal static void LookForAbandoned(Property.Models.Configuration propertyConfiguration, string bResultsFullGroupDirectory, List<string> distinctFilteredFileNameFirstSegments)
|
||||
internal static void LookForAbandoned(Property.Models.Configuration propertyConfiguration, string aResultsFullGroupDirectory, List<string> distinctFilteredFileNameFirstSegments)
|
||||
{
|
||||
string[] directories = Directory.GetDirectories(bResultsFullGroupDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
string[] directories = Directory.GetDirectories(aResultsFullGroupDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
string? directoryName = Path.GetFileName(directory);
|
||||
|
@ -1152,22 +1152,20 @@ internal abstract class MapLogic
|
||||
exifDirectory = null;
|
||||
else
|
||||
exifDirectory = Metadata.Models.Stateless.Methods.IMetadata.GetExifDirectory(mappedFile.FilePath);
|
||||
RectangleF? rectangle = ILocation.GetPercentagesRectangle(configuration.LocationDigits, wholePercentages.Value);
|
||||
personDisplayDirectoryName = mappedFile.PersonDisplayDirectoryName is null ? configuration.MappingDefaultName : mappedFile.PersonDisplayDirectoryName;
|
||||
LocationContainer locationContainer = new(dateOnly,
|
||||
exifDirectory,
|
||||
mappedFile.DirectoryNumber,
|
||||
personDisplayDirectoryName,
|
||||
null,
|
||||
null,
|
||||
mappedFile.FilePath,
|
||||
fromDistanceContent,
|
||||
id.Value,
|
||||
null,
|
||||
null,
|
||||
mappedFile.PersonKey,
|
||||
rectangle,
|
||||
wholePercentages.Value);
|
||||
LocationContainer locationContainer = new(CreationDateOnly: dateOnly,
|
||||
ExifDirectory: exifDirectory,
|
||||
DirectoryNumber: mappedFile.DirectoryNumber,
|
||||
DisplayDirectoryName: personDisplayDirectoryName,
|
||||
Encoding: null,
|
||||
FaceFile: null,
|
||||
FilePath: mappedFile.FilePath,
|
||||
FromDistanceContent: fromDistanceContent,
|
||||
Id: id.Value,
|
||||
LengthPermyriad: null,
|
||||
LengthSource: null,
|
||||
PersonKey: mappedFile.PersonKey,
|
||||
WholePercentages: wholePercentages.Value);
|
||||
lock (locationContainers)
|
||||
locationContainers.Add(locationContainer);
|
||||
}
|
||||
@ -1192,12 +1190,18 @@ internal abstract class MapLogic
|
||||
if (item.WholePercentages == locationContainer.WholePercentages)
|
||||
continue;
|
||||
itemPercentagesRectangle = ILocation.GetPercentagesRectangle(configuration.LocationDigits, item.WholePercentages);
|
||||
if (itemPercentagesRectangle is null || locationContainer.Rectangle is null)
|
||||
if (itemPercentagesRectangle is null)
|
||||
percent = null;
|
||||
else
|
||||
{
|
||||
itemPercentagesArea = itemPercentagesRectangle.Value.Width * itemPercentagesRectangle.Value.Height;
|
||||
percent = ILocation.GetIntersectPercent(itemPercentagesRectangle.Value, itemPercentagesArea, locationContainer.Rectangle.Value);
|
||||
RectangleF? rectangle = ILocation.GetPercentagesRectangle(configuration.LocationDigits, item.WholePercentages);
|
||||
if (rectangle is null)
|
||||
percent = null;
|
||||
else
|
||||
{
|
||||
itemPercentagesArea = itemPercentagesRectangle.Value.Width * itemPercentagesRectangle.Value.Height;
|
||||
percent = ILocation.GetIntersectPercent(itemPercentagesRectangle.Value, itemPercentagesArea, rectangle.Value);
|
||||
}
|
||||
}
|
||||
delete.Add(item.FilePath);
|
||||
delete.Add(locationContainer.FilePath);
|
||||
|
Reference in New Issue
Block a user