Made PhotoPrism dynamic

This commit is contained in:
2022-12-27 10:22:23 -07:00
parent e5dc8c1c05
commit b5ff1b202c
10 changed files with 58 additions and 57 deletions

View File

@ -269,7 +269,7 @@ public partial class E_Distance
return results;
}
public void LookForMatchFacesAndPossiblyRename(string facesFileNameExtension, string? eDistanceContentDirectory, MappingFromItem mappingFromItem, List<Face> faces, List<(string MappedFaceFile, int NormalizedRectangle, IReadOnlyList<MetadataExtractor.Directory>? Directories)> collection)
public void LookForMatchFacesAndPossiblyRename(string facesFileNameExtension, string eDistanceContentDirectory, MappingFromItem mappingFromItem, List<Face> faces, List<(string MappedFaceFile, int NormalizedRectangle, IReadOnlyList<MetadataExtractor.Directory>? Directories)> collection)
{
string? json;
string[] matches;
@ -295,7 +295,7 @@ public partial class E_Distance
json = Metadata.Models.Stateless.IMetadata.GetFaceEncoding(directories);
if (json is null)
{
if (!string.IsNullOrEmpty(eDistanceContentDirectory) && _DistanceMoveUnableToMatch)
if (_DistanceMoveUnableToMatch)
MoveUnableToMatch(eDistanceContentDirectory, mappedFaceFile, mappedFaceFileName);
continue;
}
@ -312,13 +312,13 @@ public partial class E_Distance
}
if (!checkFaces.Any())
{
if (!string.IsNullOrEmpty(eDistanceContentDirectory) && _DistanceMoveUnableToMatch)
if (_DistanceMoveUnableToMatch)
MoveUnableToMatch(eDistanceContentDirectory, mappedFaceFile, mappedFaceFileName);
continue;
}
if (checkFaces.Count != 1)
{
if (!string.IsNullOrEmpty(eDistanceContentDirectory) && _DistanceMoveUnableToMatch)
if (_DistanceMoveUnableToMatch)
MoveUnableToMatch(eDistanceContentDirectory, mappedFaceFile, mappedFaceFileName);
continue;
}