After testing E_Distance.SaveGroupedFaceEncodings

This commit is contained in:
2022-08-07 12:29:46 -07:00
parent 2158b4cfc2
commit daf5f428b9
57 changed files with 2626 additions and 660 deletions

View File

@ -39,7 +39,7 @@ public class B_Metadata
{
Dictionary<string, List<KeyValuePair<string, string>>> results = new();
if (_Log is null)
throw new Exception($"{nameof(_Log)} is null!");
throw new ArgumentNullException(nameof(_Log));
try
{
object? @object;
@ -137,7 +137,9 @@ public class B_Metadata
{
dictionary = GetMetadataCollection(propertyHolder.ImageFileInfo.FullName);
json = JsonSerializer.Serialize(dictionary, _WriteIndentedJsonSerializerOptions);
if (Property.Models.Stateless.IPath.WriteAllText(fileInfo.FullName, json, compareBeforeWrite: true))
bool updateDateWhenMatches = dateTimes.Any() && fileInfo.Exists && dateTimes.Max() > fileInfo.LastWriteTime;
DateTime? dateTime = !updateDateWhenMatches ? null : dateTimes.Max();
if (Property.Models.Stateless.IPath.WriteAllText(fileInfo.FullName, json, updateDateWhenMatches, compareBeforeWrite: true, updateToWhenMatches: dateTime))
{
if (!_ForceMetadataLastWriteTimeToCreationTime && (!fileInfo.Exists || fileInfo.LastWriteTime == fileInfo.CreationTime))
subFileTuples.Add(new Tuple<string, DateTime>(nameof(B_Metadata), DateTime.Now));