Z_Item has to be by Output Resolution

This commit is contained in:
2022-08-30 18:16:06 -07:00
parent 21c549e4ce
commit 8bf672e840
5 changed files with 128 additions and 128 deletions

View File

@ -713,31 +713,4 @@ internal class E_Distance
}
}
public static void SavePropertyHolders(string argZero, Container[] containers, string zPropertyHolderSingletonDirectory)
{
string json;
FileInfo fileInfo;
bool updateDateWhenMatches = false;
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
foreach (Container container in containers)
{
if (!container.Items.Any())
continue;
if (!container.SourceDirectory.StartsWith(argZero))
continue;
foreach (Item item in container.Items)
{
if (item.ImageFileHolder is null || item.Property is null || !item.Faces.Any() || !item.Closest.Any())
continue;
json = JsonSerializer.Serialize(item, jsonSerializerOptions);
fileInfo = new(Path.GetFullPath(string.Concat(zPropertyHolderSingletonDirectory, item.RelativePath, ".json")));
if (fileInfo.Directory is null)
continue;
if (!fileInfo.Directory.Exists)
continue;
_ = Shared.Models.Stateless.Methods.IPath.WriteAllText(fileInfo.FullName, json, updateDateWhenMatches, compareBeforeWrite: true);
}
}
}
}