2 Commits

Author SHA1 Message Date
357cd8c902 A_Metadata 2025-07-15 17:15:18 -07:00
1ede3ebcdb House Cleaning 2025-07-05 19:54:45 -07:00
37 changed files with 496 additions and 262 deletions

View File

@ -82,17 +82,38 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
"PopulatePropertyId": true,
"PropertiesChangedForProperty": false,
"RootDirectory": "C:/Tmp/Phares/Compare/Images-dd514b88",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"PropertyContentCollectionFiles": [
"/Images-ec5a909 - Results/A) Property/2022-12-30/[()]/637869381676042455.json",
@ -117,7 +138,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
],
"VerifyToSeason": [
". 2000",

View File

@ -53,7 +53,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
"PopulatePropertyId": true,
@ -90,12 +89,32 @@
"/zzz Phares Slides/Slides 2015-06-10/Magazine 01"
],
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"PropertyContentCollectionFiles": [
"/Images-ec5a909 - Results/A) Property/2022-12-30/[()]/637869381676042455.json",
@ -120,7 +139,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
],
"VerifyToSeason": [
". 2000",

View File

@ -134,7 +134,7 @@ internal abstract class Container
int maxDegreeOfParallelism = Environment.ProcessorCount;
int filesCollectionDirectoryLength = filesCollectionDirectory.Length;
ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = maxDegreeOfParallelism };
(_, string bResultsFullGroupDirectory) = dlibDotNet.GetResultsFullGroupDirectories();
string bResultsFullGroupDirectory = dlibDotNet.GetResultsFullGroupDirectories();
string jsonGroupDirectory = Path.Combine(bResultsFullGroupDirectory, propertyConfiguration.ResultSingleton);
if (!Directory.Exists(jsonGroupDirectory))
_ = Directory.CreateDirectory(jsonGroupDirectory);
@ -226,8 +226,8 @@ internal abstract class Container
if (filePaths is not null && change is not null)
RenameFile(filePair, filePair.FilePath, change.Value, filePaths);
}
lastWriteTimeChanged = exifDirectory?.FilePath is not null ? exifDirectory.FilePath.LastWriteTicks != filePair.FilePath.LastWriteTicks : null;
relativePath = Shared.Models.Stateless.Methods.IPath.GetRelativePath(filePair.FilePath.FullName, rootDirectoryLength, forceExtensionToLower: true);
lastWriteTimeChanged = exifDirectory?.FilePath is not null ? propertyConfiguration.PropertiesChangedForProperty || exifDirectory.FilePath.LastWriteTicks != filePair.FilePath.LastWriteTicks : null;
if (filePair.Match is not null)
sourceDirectoryFileHolder = IFileHolder.Get(filePair.Match);
else if (!filePair.IsUnique)
@ -381,7 +381,7 @@ internal abstract class Container
private static void AnyMoved(IDlibDotNet dlibDotNet, IPropertyConfiguration propertyConfiguration, string facesFileNameExtension, string facesHiddenFileNameExtension, string eDistanceContentDirectory, ReadOnlyCollection<ReadOnlyCollection<FilePath>> filePathsCollection, ReadOnlyDictionary<int, ReadOnlyCollection<FilePath>> idToFilePaths, string directorySearchFilter)
{
const string extension = ".json";
(_, string bResultsFullGroupDirectory) = dlibDotNet.GetResultsFullGroupDirectories();
string bResultsFullGroupDirectory = dlibDotNet.GetResultsFullGroupDirectories();
string bMetaSingletonDirectory = Path.Combine(bResultsFullGroupDirectory, propertyConfiguration.ResultSingleton);
if (!Directory.Exists(bMetaSingletonDirectory))
_ = Directory.CreateDirectory(bMetaSingletonDirectory);

View File

@ -57,7 +57,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -71,12 +70,32 @@
"ResultSingleton": "{}",
"RootDirectory": "D:/Images",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -92,7 +111,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
}

View File

@ -46,7 +46,7 @@ public class DateGroup
if (!_IsEnvironment.Development)
throw new Exception("This program only allows development environments!");
long ticks = DateTime.Now.Ticks;
Metadata.Models.B_Metadata metadata = new(propertyConfiguration);
Metadata.Models.A_Metadata metadata = new(propertyConfiguration);
string[] dbFiles = Directory.GetFiles(propertyConfiguration.RootDirectory, "*.db", SearchOption.AllDirectories);
foreach (string dbFile in dbFiles)
File.Delete(dbFile);

View File

@ -57,7 +57,6 @@
"ByWeek": false,
"DateGroup": "dd514b88",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"KeepFullPath": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -70,12 +69,32 @@
"ResultSingleton": "{}",
"RootDirectory": "C:/Tmp/phares/Pictures",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"PropertyContentCollectionFiles": [],
"ValidImageFormatExtensions": [
@ -92,7 +111,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
],
"VerifyToSeason": [
". 2000",

View File

@ -59,7 +59,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -72,12 +71,32 @@
"ResultSingleton": "{}",
"RootDirectory": "C:/Tmp/Phares/Compare/Images-dd514b88",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -93,7 +112,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
}

View File

@ -54,7 +54,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -67,12 +66,32 @@
"ResultSingleton": "{}",
"RootDirectory": "C:/Tmp/Phares/Compare/Images-dd514b88",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -88,7 +107,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
}

View File

@ -55,7 +55,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -68,12 +67,32 @@
"ResultSingleton": "{}",
"RootDirectory": "C:/Tmp/Phares/Compare/Images-dd514b88",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -89,7 +108,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
}

View File

@ -7,7 +7,6 @@ using System.Text.Json.Serialization;
using View_by_Distance.FaceRecognitionDotNet;
using View_by_Distance.Metadata.Models;
using View_by_Distance.Metadata.Models.Stateless.Methods;
using View_by_Distance.Property.Models;
using View_by_Distance.Resize.Models;
using View_by_Distance.Shared.Models;
using View_by_Distance.Shared.Models.Properties;
@ -190,7 +189,7 @@ public class D_Face : IFaceD
FileHolder fileHolder;
string deterministicHashCodeKey;
string fileName = mappingFromItem.FilePath.NameWithoutExtension;
string[] changesFrom = [nameof(A_Property), nameof(B_Metadata), nameof(C_Resize)];
string[] changesFrom = [nameof(A_Metadata), nameof(C_Resize)];
List<DateTime> dateTimes = (from l in subFileTuples where changesFrom.Contains(l.Item1) select l.Item2).ToList();
CombinedEnumAndIndex cei = Shared.Models.Stateless.Methods.IPath.GetCombinedEnumAndIndex(_PropertyConfiguration, filePath);
string directory = _ResultContentFileGroups[0][cei.Enum][cei.Index];
@ -269,7 +268,7 @@ public class D_Face : IFaceD
List<Shared.Models.Face>? results;
string? json;
List<Location> locations;
string[] changesFrom = [nameof(A_Property), nameof(B_Metadata), nameof(C_Resize)];
string[] changesFrom = [nameof(A_Metadata), nameof(C_Resize)];
List<DateTime> dateTimes = (from l in subFileTuples where changesFrom.Contains(l.Item1) select l.Item2).ToList();
string fileName = $"{mappingFromItem.FilePath.NameWithoutExtension}{mappingFromItem.FilePath.ExtensionLowered}.json";
CombinedEnumAndIndex cei = Shared.Models.Stateless.Methods.IPath.GetCombinedEnumAndIndex(_PropertyConfiguration, filePath);
@ -475,7 +474,7 @@ public class D_Face : IFaceD
dFace.ReSaveFace(exifDirectory, filePath, face, mappedFile: false);
continue;
}
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(face.Location, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, source.Height, source.Width, collection.Count);
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(face.Location, source.Height, source.Width, collection.Count);
if (location is null)
continue;
width = location.Right - location.Left;
@ -506,7 +505,7 @@ public class D_Face : IFaceD
}
if (File.Exists(fileName))
File.Delete(fileName);
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(_FaceDistanceHiddenImageFactor, face.Location, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, source.Height, source.Width, collection.Count);
location = Shared.Models.Stateless.Methods.ILocation.GetLocation(_FaceDistanceHiddenImageFactor, face.Location, source.Height, source.Width, collection.Count);
if (location is null)
continue;
width = location.Right - location.Left;

View File

@ -214,7 +214,7 @@ public class D2_FaceParts
bool updateDateWhenMatches = false;
List<(Shared.Models.Face, string, string)> collection = [];
string fileName = mappingFromItem.FilePath.NameWithoutExtension;
string[] changesFrom = [nameof(A_Property), nameof(B_Metadata), nameof(C_Resize), nameof(D_Face)];
string[] changesFrom = [nameof(A_Metadata), nameof(C_Resize), nameof(D_Face)];
List<DateTime> dateTimes = (from l in subFileTuples where changesFrom.Contains(l.Item1) select l.Item2).ToList();
CombinedEnumAndIndex cei = Shared.Models.Stateless.Methods.IPath.GetCombinedEnumAndIndex(_PropertyConfiguration, filePath);
string directory = _ResultContentFileGroups[0][cei.Enum][cei.Index];

View File

@ -31,6 +31,8 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
ReadOnlyCollection<ReadOnlyCollection<FilePath>> FilePathsCollection,
ReadOnlyDictionary<int, Identifier>? SplatNineIdentifiers);
public int? CurrentTick =>
_ProgressBar?.CurrentTick;
public long Ticks { get; init; }
private readonly D_Face _Faces;
@ -87,7 +89,7 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
if (configuration.IgnoreExtensions is null)
throw new NullReferenceException(nameof(configuration.IgnoreExtensions));
_BlurHasher = new BlurHash.Models.C2_BlurHasher(configuration.PropertyConfiguration);
string propertyRoot = Property.Models.Stateless.IResult.GetResultsGroupDirectory(propertyConfiguration, nameof(A_Property), create: false);
string propertyRoot = Property.Models.Stateless.IResult.GetResultsGroupDirectory(propertyConfiguration, nameof(A_Metadata), create: false);
_PropertyRootExistedBefore = !Directory.Exists(propertyRoot);
string argZero = args.Count > 0 ? Path.GetFullPath(args[0]) : Path.GetFullPath(propertyConfiguration.RootDirectory);
_ArgZeroIsConfigurationRootDirectory = propertyConfiguration.RootDirectory == argZero;
@ -175,7 +177,7 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
_Logger?.LogInformation("First run completed. Run again if wanted");
}
private int FullParallelForWork(B_Metadata metadata,
private int FullParallelForWork(A_Metadata metadata,
MapLogic mapLogic,
string outputResolution,
bool outputResolutionHasNumber,
@ -195,18 +197,13 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
long ticks = DateTime.Now.Ticks;
DateTime dateTime = DateTime.Now;
List<string> parseExceptions = [];
string[] changesFrom = [nameof(A_Property)];
string[] changesFrom = [nameof(A_Metadata)];
List<Tuple<string, DateTime>> subFileTuples = [];
FileHolder resizedFileHolder = _Resize.GetResizedFileHolder(cResultsFullGroupDirectory, item, outputResolutionHasNumber);
if (item.ExifDirectory is null || item.ExifDirectory.FilePath?.Id is null)
throw new Exception();
if (!item.SourceDirectoryFileHolder.Exists || item.SourceDirectoryFileHolder.CreationTime is null || item.SourceDirectoryFileHolder.LastWriteTime is null || item.Any())
throw new Exception();
if (_Configuration.PropertyConfiguration.ForcePropertyLastWriteTimeToCreationTime && item.SourceDirectoryFileHolder.LastWriteTime.Value != item.SourceDirectoryFileHolder.CreationTime.Value)
{
File.SetLastWriteTime(item.SourceDirectoryFileHolder.FullName, item.SourceDirectoryFileHolder.CreationTime.Value);
subFileTuples.Add(new Tuple<string, DateTime>(nameof(A_Property), item.SourceDirectoryFileHolder.CreationTime.Value));
}
else if (item.SourceDirectoryFileHolder.LastWriteTime is not null)
subFileTuples.Add(new Tuple<string, DateTime>(nameof(A_Property), item.SourceDirectoryFileHolder.LastWriteTime.Value));
else
@ -323,7 +320,7 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
}
private (int, bool) FullParallelWork(int maxDegreeOfParallelism,
B_Metadata metadata,
A_Metadata metadata,
MapLogic mapLogic,
string outputResolution,
bool outputResolutionHasNumber,
@ -382,7 +379,7 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
string propertyRoot,
string fPhotoPrismSingletonDirectory,
int count,
B_Metadata metadata,
A_Metadata metadata,
Record record,
ReadOnlyCollection<Container.Models.Container> readOnlyContainers,
MapLogic mapLogic)
@ -478,23 +475,16 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
GC.SuppressFinalize(this);
}
(string, string) IDlibDotNet.GetResultsFullGroupDirectories()
string IDlibDotNet.GetResultsFullGroupDirectories()
{
string aResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
string result = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
_Configuration.PropertyConfiguration,
nameof(A_Property),
nameof(A_Metadata),
string.Empty,
includeResizeGroup: false,
includeModel: false,
includePredictorModel: false);
string bResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
_Configuration.PropertyConfiguration,
nameof(B_Metadata),
string.Empty,
includeResizeGroup: false,
includeModel: false,
includePredictorModel: false);
return new(aResultsFullGroupDirectory, bResultsFullGroupDirectory);
return new(result);
}
void IDlibDotNet.ConstructProgressBar(int maxTicks, string message)
@ -1112,12 +1102,10 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
MapLogic? mapLogic;
Record? record = null;
string seasonDirectory;
A_Property propertyLogic;
IDlibDotNet dlibDotNet = this;
DateTime dateTime = new(Ticks);
string eDistanceContentDirectory;
string? a2PeopleContentDirectory;
string aResultsFullGroupDirectory;
string bResultsFullGroupDirectory;
string cResultsFullGroupDirectory;
string fPhotoPrismContentDirectory;
@ -1133,14 +1121,14 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
Path.Combine(_Configuration.PropertyConfiguration.RootDirectory, "LinkedIn")
];
bool runToDoCollectionFirst = GetRunToDoCollectionFirst(_Configuration, checkDirectories);
(aResultsFullGroupDirectory, bResultsFullGroupDirectory) = dlibDotNet.GetResultsFullGroupDirectories();
bResultsFullGroupDirectory = dlibDotNet.GetResultsFullGroupDirectories();
(int season, string seasonName) = Shared.Models.Stateless.Methods.IProperty.GetSeason(dateTime.DayOfYear);
Shared.Models.Stateless.Methods.IPath.ChangeDateForEmptyDirectories(_Configuration.PropertyConfiguration.RootDirectory, dlibDotNet.Ticks);
a2PeopleContentDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(_Configuration.PropertyConfiguration, nameof(A2_People), "([])");
eDistanceContentDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(_Configuration.PropertyConfiguration, nameof(E_Distance), _Configuration.PropertyConfiguration.ResultContent);
string a2PeopleSingletonDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(_Configuration.PropertyConfiguration, nameof(A2_People), _Configuration.PropertyConfiguration.ResultSingleton);
_ = Directory.CreateDirectory(Path.Combine(eDistanceContentDirectory, dlibDotNet.Ticks.ToString()));
B_Metadata metadata = new(dlibDotNet, _Configuration.PropertyConfiguration, _Configuration.ForceMetadataLastWriteTimeToCreationTime, _Configuration.PropertiesChangedForMetadata, dlibDotNet.Ticks, bResultsFullGroupDirectory);
A_Metadata metadata = new(dlibDotNet, _Configuration.PropertyConfiguration, _Configuration.ForceMetadataLastWriteTimeToCreationTime, _Configuration.PropertiesChangedForMetadata, dlibDotNet.Ticks, bResultsFullGroupDirectory);
if (runToDoCollectionFirst)
mapLogic = null;
else
@ -1157,7 +1145,6 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
}
fPhotoPrismContentDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(_Configuration.PropertyConfiguration, nameof(F_PhotoPrism), _Configuration.PropertyConfiguration.ResultContent);
fPhotoPrismSingletonDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(_Configuration.PropertyConfiguration, nameof(F_PhotoPrism), _Configuration.PropertyConfiguration.ResultSingleton);
propertyLogic = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, _Resize.FileNameExtension, _Configuration.Reverse, aResultsFullGroupDirectory);
if (record is not null && record.FilesCollectionCountIsOne)
{
if (record.FilePathsCollection is null)
@ -1174,9 +1161,8 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
}
argZero = SaveUrlAndGetNewRootDirectory(record.FilePathsCollection.First());
_Configuration.PropertyConfiguration.ChangeRootDirectory(argZero);
(aResultsFullGroupDirectory, bResultsFullGroupDirectory) = dlibDotNet.GetResultsFullGroupDirectories();
propertyRoot = Property.Models.Stateless.IResult.GetResultsGroupDirectory(_Configuration.PropertyConfiguration, nameof(A_Property), create: false);
propertyLogic = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, _Resize.FileNameExtension, _Configuration.Reverse, aResultsFullGroupDirectory);
bResultsFullGroupDirectory = dlibDotNet.GetResultsFullGroupDirectories();
propertyRoot = Property.Models.Stateless.IResult.GetResultsGroupDirectory(_Configuration.PropertyConfiguration, nameof(A_Metadata), create: false);
}
if (configurationOutputResolutionsHas)
{
@ -1270,7 +1256,6 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
string c2ResultsFullGroupDirectory;
string d2ResultsFullGroupDirectory;
(cResultsFullGroupDirectory, c2ResultsFullGroupDirectory, dResultsFullGroupDirectory, d2ResultsFullGroupDirectory) = dlibDotNet.GetResultsFullGroupDirectories(outputResolution);
_ = Shared.Models.Stateless.Methods.IPath.DeleteEmptyDirectories(Path.Combine(aResultsFullGroupDirectory, _Configuration.PropertyConfiguration.ResultSingleton));
_ = Shared.Models.Stateless.Methods.IPath.DeleteEmptyDirectories(Path.Combine(bResultsFullGroupDirectory, _Configuration.PropertyConfiguration.ResultSingleton));
_ = Shared.Models.Stateless.Methods.IPath.DeleteEmptyDirectories(Path.Combine(cResultsFullGroupDirectory, _Configuration.PropertyConfiguration.ResultSingleton));
if (_Configuration.LoadOrCreateThenSaveImageFacesResultsForOutputResolutions.Contains(outputResolution))
@ -1314,10 +1299,10 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
}
}
if (items.Count > 0)
throw new Exception($"{items.Count} item(s) of {count} item(s) are not setup!");
throw new Exception($"{items.Count} item(s) of {count} item(s) are not setup!{Environment.NewLine}{string.Join(Environment.NewLine, items.Select(l => l.FilePath.FileNameFirstSegment))}");
}
private Record GetFilesCollectionThenCopyOrMove(IDlibDotNet dlibDotNet, B_Metadata metadata, string fileSearchFilter, string directorySearchFilter, string bResultsFullGroupDirectory, string outputResolution)
private Record GetFilesCollectionThenCopyOrMove(IDlibDotNet dlibDotNet, A_Metadata metadata, string fileSearchFilter, string directorySearchFilter, string bResultsFullGroupDirectory, string outputResolution)
{
Record result;
int count;

View File

@ -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);
}

View File

@ -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);

View File

@ -54,7 +54,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -68,12 +67,32 @@
"ResultSingleton": "{}",
"RootDirectory": "D:/Images",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -89,7 +108,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
}

View File

@ -11,7 +11,7 @@ namespace View_by_Distance.Metadata.Models;
/// <summary>
// Dictionary<string, List<KeyValuePair<string, string>>>
/// </summary>
public class B_Metadata : IMetadata<MetadataExtractor.Directory>
public class A_Metadata : IMetadata<MetadataExtractor.Directory>
{
private readonly Dictionary<int, ExifDirectory> _ExifDirectoriesById;
@ -32,7 +32,7 @@ public class B_Metadata : IMetadata<MetadataExtractor.Directory>
private readonly JsonSerializerOptions _WriteIndentedJsonSerializerOptions;
private readonly ReadOnlyDictionary<byte, ReadOnlyCollection<string>>[] _ResultSingletonFileGroups;
public B_Metadata(IDlibDotNet? dlibDotNet, IPropertyConfiguration propertyConfiguration, bool forceMetadataLastWriteTimeToCreationTime, bool propertiesChangedForMetadata, long ticks, string bResultsFullGroupDirectory)
public A_Metadata(IDlibDotNet? dlibDotNet, IPropertyConfiguration propertyConfiguration, bool forceMetadataLastWriteTimeToCreationTime, bool propertiesChangedForMetadata, long ticks, string bResultsFullGroupDirectory)
{
_PropertyConfiguration = propertyConfiguration;
_PropertiesChangedForMetadata = propertiesChangedForMetadata;
@ -62,7 +62,7 @@ public class B_Metadata : IMetadata<MetadataExtractor.Directory>
Shared.Models.Stateless.Methods.IPath.CreateDirectories(directories);
ReadOnlyCollection<ReadOnlyCollection<FilePath>> filePathsCollection = IDirectory.GetFilePathCollections(propertyConfiguration, directorySearchFilter, fileSearchFilter, filesCollectionRootDirectory, useIgnoreExtensions: true, useCeilingAverage: false);
ReadOnlyCollection<FilePair> filePairs = IFilePair.GetFilePairs(propertyConfiguration, directorySearchFilter, extension, jsonGroupSingletonDirectory, filePathsCollection);
string message = $") {nameof(B_Metadata)} - Preloading ExifDirectory Dictionary - {(int)Math.Floor(new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds)} total second(s)";
string message = $") {nameof(A_Metadata)} - Preloading ExifDirectory Dictionary - {(int)Math.Floor(new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds)} total second(s)";
dlibDotNet?.ConstructProgressBar(filePairs.Count, message);
_ = Parallel.For(0, filePairs.Count, parallelOptions, (i, state) => ParallelFor(filePairs[i], exifDirectoriesById, tick));
_ExifDirectoriesById = exifDirectoriesById;
@ -156,12 +156,12 @@ public class B_Metadata : IMetadata<MetadataExtractor.Directory>
result = JsonSerializer.Deserialize(json, ExifDirectorySourceGenerationContext.Default.ExifDirectory);
if (result is null)
throw new Exception();
subFileTuples.Add(new Tuple<string, DateTime>(nameof(B_Metadata), fileInfo.LastWriteTime));
subFileTuples.Add(new Tuple<string, DateTime>(nameof(A_Metadata), fileInfo.LastWriteTime));
}
catch (Exception)
{
result = null;
parseExceptions.Add(nameof(B_Metadata));
parseExceptions.Add(nameof(A_Metadata));
}
}
if (result is null)
@ -173,12 +173,12 @@ public class B_Metadata : IMetadata<MetadataExtractor.Directory>
if (Shared.Models.Stateless.Methods.IPath.WriteAllText(fileInfo.FullName, json, updateDateWhenMatches, compareBeforeWrite: true, updateToWhenMatches: dateTime))
{
if (!_ForceMetadataLastWriteTimeToCreationTime)
subFileTuples.Add(new Tuple<string, DateTime>(nameof(B_Metadata), DateTime.Now));
subFileTuples.Add(new Tuple<string, DateTime>(nameof(A_Metadata), DateTime.Now));
else
{
File.SetLastWriteTime(fileInfo.FullName, fileInfo.CreationTime);
fileInfo.Refresh();
subFileTuples.Add(new Tuple<string, DateTime>(nameof(B_Metadata), fileInfo.CreationTime));
subFileTuples.Add(new Tuple<string, DateTime>(nameof(A_Metadata), fileInfo.CreationTime));
}
}
}

View File

@ -54,7 +54,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -68,12 +67,32 @@
"ResultSingleton": "{}",
"RootDirectory": "D:/Images",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -89,7 +108,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
}

View File

@ -53,7 +53,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -67,12 +66,32 @@
"ResultSingleton": "{}",
"RootDirectory": "D:/Images",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -88,7 +107,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
}

View File

@ -52,7 +52,6 @@
"Configuration": {
"DateGroup": "dd514b88",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"KeepFullPath": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -60,12 +59,32 @@
"PropertiesChangedForProperty": false,
"RootDirectory": "C:/Tmp/Phares/Pictures",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"PropertyContentCollectionFiles": [],
"Spelling": [
@ -108,7 +127,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
],
"VerifyToSeason": [
". 2000",

View File

@ -9,7 +9,6 @@ public class Configuration
public string? DateGroup { get; set; }
public string? FileNameDirectorySeparator { get; set; }
public bool? ForcePropertyLastWriteTimeToCreationTime { get; set; }
public string[]? IgnoreExtensions { get; set; }
public string[]? IgnoreRulesKeyWords { get; set; }
public int? IntMinValueLength { get; set; }
@ -64,7 +63,6 @@ public class Configuration
if (configuration is null) throw new NullReferenceException(nameof(configuration));
if (configuration.DateGroup is null) throw new NullReferenceException(nameof(configuration.DateGroup));
if (configuration.FileNameDirectorySeparator is null) throw new NullReferenceException(nameof(configuration.FileNameDirectorySeparator));
if (configuration.ForcePropertyLastWriteTimeToCreationTime is null) throw new NullReferenceException(nameof(configuration.ForcePropertyLastWriteTimeToCreationTime));
if (configuration.IgnoreExtensions is null) throw new NullReferenceException(nameof(configuration.IgnoreExtensions));
if (configuration.IgnoreRulesKeyWords is null) throw new NullReferenceException(nameof(configuration.IgnoreRulesKeyWords));
if (configuration.IntMinValueLength is null) throw new NullReferenceException(nameof(configuration.IntMinValueLength));
@ -91,7 +89,6 @@ public class Configuration
// if (configuration.VerifyToSeason is null) throw new NullReferenceException(nameof(configuration.VerifyToSeason));
result = new(configuration.DateGroup,
configuration.FileNameDirectorySeparator,
configuration.ForcePropertyLastWriteTimeToCreationTime.Value,
configuration.IgnoreExtensions,
configuration.IgnoreRulesKeyWords,
configuration.IntMinValueLength.Value,

View File

@ -12,7 +12,6 @@ public class Configuration : Shared.Models.Properties.IPropertyConfiguration
public string DateGroup { init; get; }
public string FileNameDirectorySeparator { init; get; }
public bool ForcePropertyLastWriteTimeToCreationTime { init; get; }
public string[] IgnoreExtensions { init; get; }
public string[] IgnoreRulesKeyWords { init; get; }
public int IntMinValueLength { init; get; }
@ -39,7 +38,6 @@ public class Configuration : Shared.Models.Properties.IPropertyConfiguration
[JsonConstructor]
public Configuration(string dateGroup,
string fileNameDirectorySeparator,
bool forcePropertyLastWriteTimeToCreationTime,
string[] ignoreExtensions,
string[] ignoreRulesKeyWords,
int intMinValueLength,
@ -67,7 +65,6 @@ public class Configuration : Shared.Models.Properties.IPropertyConfiguration
{
DateGroup = dateGroup;
FileNameDirectorySeparator = fileNameDirectorySeparator;
ForcePropertyLastWriteTimeToCreationTime = forcePropertyLastWriteTimeToCreationTime;
IgnoreExtensions = ignoreExtensions;
IgnoreRulesKeyWords = ignoreRulesKeyWords;
IntMinValueLength = intMinValueLength;

View File

@ -65,7 +65,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -82,12 +81,32 @@
"xxxRootDirectory": "D:/1-Images-A/Images-dd514b88/Facebook/2023.3 Facebook",
"RootDirectory": "D:/7-Question/California",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -103,7 +122,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
},

View File

@ -85,7 +85,7 @@ public class Rename
const bool useCeilingAverage = false;
const string directorySearchFilter = "*";
List<string> distinctDirectories = [];
B_Metadata metadata = new(_PropertyConfiguration);
A_Metadata metadata = new(_PropertyConfiguration);
List<(FileHolder, string, string)> toDoCollection = [];
List<(FileHolder, string)> verifiedToDoCollection = [];
ProgressBarOptions options = new() { ProgressCharacter = '─', ProgressBarOnBottom = true, DisableBottomPercentage = true };
@ -209,7 +209,7 @@ public class Rename
return results;
}
private List<Record> GetRecords(B_Metadata metadata, int offset, ProgressBar progressBar, string[] files)
private List<Record> GetRecords(A_Metadata metadata, int offset, ProgressBar progressBar, string[] files)
{
List<Record> results = [];
int? id;

View File

@ -195,7 +195,7 @@ public class C_Resize
{
Dictionary<string, int[]>? results;
string json;
string[] changesFrom = [nameof(A_Property), nameof(B_Metadata)];
string[] changesFrom = [nameof(A_Metadata)];
List<DateTime> dateTimes = (from l in subFileTuples where changesFrom.Contains(l.Item1) select l.Item2).ToList();
CombinedEnumAndIndex cei = Shared.Models.Stateless.Methods.IPath.GetCombinedEnumAndIndex(_PropertyConfiguration, filePath);
string fileName = $"{mappingFromItem.FilePath.NameWithoutExtension}{mappingFromItem.FilePath.ExtensionLowered}.json";
@ -353,7 +353,7 @@ public class C_Resize
int outputResolutionHeight = resize[_OutputResolutionHeightIndex];
int outputResolutionOrientation = resize[_OutputResolutionOrientationIndex];
int[] originalCollection = outputResolutionToResize[_Original];
string[] changesFrom = [nameof(A_Property), nameof(B_Metadata), nameof(C_Resize)];
string[] changesFrom = [nameof(A_Metadata), nameof(C_Resize)];
List<DateTime> dateTimes = (from l in subFileTuples where changesFrom.Contains(l.Item1) select l.Item2).ToList();
if (_OverrideForResizeImages)
check = true;

View File

@ -64,7 +64,7 @@ public class SetCreatedDate
{ }
}
private List<Record> GetRecords(ProgressBar progressBar, ASCIIEncoding asciiEncoding, B_Metadata metadata, string[] files)
private List<Record> GetRecords(ProgressBar progressBar, ASCIIEncoding asciiEncoding, A_Metadata metadata, string[] files)
{
List<Record> results = [];
int? id;
@ -102,7 +102,7 @@ public class SetCreatedDate
Record[] records;
List<Record> unordered;
ASCIIEncoding asciiEncoding = new();
B_Metadata metadata = new(_PropertyConfiguration);
A_Metadata metadata = new(_PropertyConfiguration);
List<Record[]> collections = [];
foreach (string[] files in filesCollection)
{

View File

@ -55,7 +55,6 @@
"DateGroup": "dd514b88",
"DiffPropertyDirectory": "",
"FileNameDirectorySeparator": ".Z.",
"ForcePropertyLastWriteTimeToCreationTime": false,
"MaxImagesInDirectoryForTopLevelFirstPass": 10,
"OutputExtension": ".jpg",
"Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]",
@ -69,12 +68,32 @@
"ResultSingleton": "{}",
"RootDirectory": "D:/Images",
"IgnoreExtensions": [
".ffs_db",
".FFS_DB",
".gif",
".GIF",
".html",
".HTML",
".ico",
".ICO",
".json",
".JSON",
".lnk",
".LNK",
".lsv",
".LSV",
".nef",
".NEF",
".pdf",
".PDF"
".PDF",
".ts",
".TS",
".txt",
".TXT",
".webp",
".WEBP",
".xmp",
".XMP"
],
"ValidImageFormatExtensions": [
".bmp",
@ -90,7 +109,9 @@
".tiff",
".TIFF",
".tif",
".TIF"
".TIF",
".webp",
".WEBP"
]
}
}

View File

@ -23,7 +23,7 @@ public class Location : Properties.ILocation, IEquatable<Location>
_ = Stateless.Methods.Location.Check(bottom, left, right, top, zCount: 1, throwException: true);
}
public Location(double confidence, int height, Location location, int locationDigits, int locationFactor, int width, int zCount) :
public Location(double confidence, int height, Location location, int width, int zCount) :
this(
location.Bottom,
confidence,
@ -32,7 +32,7 @@ public class Location : Properties.ILocation, IEquatable<Location>
location.Top) =>
Stateless.Methods.Location.Check(Bottom, height, Left, Right, Top, width, zCount, throwException: true);
public Location(int bottom, double confidence, int height, int left, int locationDigits, int locationFactor, int right, int top, int width, int zCount) :
public Location(int bottom, double confidence, int height, int left, int right, int top, int width, int zCount) :
this(
bottom,
confidence,
@ -41,7 +41,7 @@ public class Location : Properties.ILocation, IEquatable<Location>
top) =>
Stateless.Methods.Location.Check(Bottom, height, Left, Right, Top, width, zCount, throwException: true);
public Location(int height, Location location, int locationDigits, int locationFactor, int width, int zCount) :
public Location(int height, Location location, int width, int zCount) :
this(
location.Bottom,
location.Confidence,
@ -50,7 +50,7 @@ public class Location : Properties.ILocation, IEquatable<Location>
location.Top) =>
Stateless.Methods.Location.Check(Bottom, height, Left, Right, Top, width, zCount, throwException: true);
public Location(double confidence, int factor, int height, Location location, int locationDigits, int locationFactor, int width, int zCount)
public Location(double confidence, int factor, int height, Location location, int width, int zCount)
{
int x = (location.Right - location.Left) / factor;
int y = (location.Bottom - location.Top) / factor;

View File

@ -1,5 +1,3 @@
using System.Drawing;
namespace View_by_Distance.Shared.Models;
public record LocationContainer(DateOnly CreationDateOnly,
@ -14,47 +12,44 @@ public record LocationContainer(DateOnly CreationDateOnly,
int? LengthPermyriad,
FilePath? LengthSource,
long? PersonKey,
RectangleF? Rectangle,
int WholePercentages)
{
public static LocationContainer Get(LocationContainer locationContainer, object? encoding, bool keepExifDirectory)
{
LocationContainer result;
result = new(locationContainer.CreationDateOnly,
keepExifDirectory ? locationContainer.ExifDirectory : null,
locationContainer.DirectoryNumber,
locationContainer.DisplayDirectoryName,
encoding,
locationContainer.FaceFile,
locationContainer.FilePath,
locationContainer.FromDistanceContent,
locationContainer.Id,
locationContainer.LengthPermyriad,
locationContainer.LengthSource,
locationContainer.PersonKey,
locationContainer.Rectangle,
locationContainer.WholePercentages);
result = new(CreationDateOnly: locationContainer.CreationDateOnly,
ExifDirectory: keepExifDirectory ? locationContainer.ExifDirectory : null,
DirectoryNumber: locationContainer.DirectoryNumber,
DisplayDirectoryName: locationContainer.DisplayDirectoryName,
Encoding: encoding,
FaceFile: locationContainer.FaceFile,
FilePath: locationContainer.FilePath,
FromDistanceContent: locationContainer.FromDistanceContent,
Id: locationContainer.Id,
LengthPermyriad: locationContainer.LengthPermyriad,
LengthSource: locationContainer.LengthSource,
PersonKey: locationContainer.PersonKey,
WholePercentages: locationContainer.WholePercentages);
return result;
}
public static LocationContainer Get(LocationContainer source, LocationContainer locationContainer, int lengthPermyriad, bool keepExifDirectory, bool keepEncoding)
{
LocationContainer result;
result = new(locationContainer.CreationDateOnly,
keepExifDirectory ? locationContainer.ExifDirectory : null,
locationContainer.DirectoryNumber,
locationContainer.DisplayDirectoryName,
keepEncoding ? locationContainer.Encoding : null,
locationContainer.FaceFile,
locationContainer.FilePath,
locationContainer.FromDistanceContent,
locationContainer.Id,
lengthPermyriad,
source.FilePath,
locationContainer.PersonKey,
locationContainer.Rectangle,
locationContainer.WholePercentages);
result = new(CreationDateOnly: locationContainer.CreationDateOnly,
ExifDirectory: keepExifDirectory ? locationContainer.ExifDirectory : null,
DirectoryNumber: locationContainer.DirectoryNumber,
DisplayDirectoryName: locationContainer.DisplayDirectoryName,
Encoding: keepEncoding ? locationContainer.Encoding : null,
FaceFile: locationContainer.FaceFile,
FilePath: locationContainer.FilePath,
FromDistanceContent: locationContainer.FromDistanceContent,
Id: locationContainer.Id,
LengthPermyriad: lengthPermyriad,
LengthSource: source.FilePath,
PersonKey: locationContainer.PersonKey,
WholePercentages: locationContainer.WholePercentages);
return result;
}

View File

@ -8,7 +8,6 @@ public interface IPropertyConfiguration
public string[] IgnoreRulesKeyWords { init; get; }
public int IntMinValueLength { init; get; }
public string PersonBirthdayFormat { init; get; }
public bool PropertiesChangedForProperty { init; get; }
public string[] PropertyContentCollectionFiles { init; get; }
public string ResultAllInOne { init; get; }
public int ResultAllInOneSubdirectoryLength { init; get; }

View File

@ -5,7 +5,8 @@ public interface IDlibDotNet
void Tick();
long Ticks { get; }
(string, string) GetResultsFullGroupDirectories();
int? CurrentTick { get; }
string GetResultsFullGroupDirectories();
void ConstructProgressBar(int maxTicks, string message);
(string, string, string, string) GetResultsFullGroupDirectories(string outputResolution);

View File

@ -55,15 +55,15 @@ public interface ILocation
static string GetLeftPadded(int locationDigits, int value) =>
GetLeftPadded(locationDigits, value.ToString());
Models.Location? TestStatic_GetLocation(Models.Location? location, int locationDigits, int locationFactor, int height, int width, int zCount) =>
GetLocation(location, locationDigits, locationFactor, height, width, zCount);
static Models.Location? GetLocation(Models.Location? location, int locationDigits, int locationFactor, int height, int width, int zCount) =>
location is null ? null : new(location.Confidence, height, location, locationDigits, locationFactor, width, zCount);
Models.Location? TestStatic_GetLocation(Models.Location? location, int height, int width, int zCount) =>
GetLocation(location, height, width, zCount);
static Models.Location? GetLocation(Models.Location? location, int height, int width, int zCount) =>
location is null ? null : new(location.Confidence, height, location, width, zCount);
Models.Location? TestStatic_GetLocation(int factor, Models.Location? location, int locationDigits, int locationFactor, int height, int width, int zCount) =>
GetLocation(factor, location, locationDigits, locationFactor, height, width, zCount);
static Models.Location? GetLocation(int factor, Models.Location? location, int locationDigits, int locationFactor, int height, int width, int zCount) =>
location is null ? null : new(location.Confidence, factor, height, location, locationDigits, locationFactor, width, zCount);
Models.Location? TestStatic_GetLocation(int factor, Models.Location? location, int height, int width, int zCount) =>
GetLocation(factor, location, height, width, zCount);
static Models.Location? GetLocation(int factor, Models.Location? location, int height, int width, int zCount) =>
location is null ? null : new(location.Confidence, factor, height, location, width, zCount);
(decimal?, decimal?, decimal?, decimal?) TestStatic_GetHeightLeftTopWidth(int bottom, int height, int left, int right, int top, int width) =>
GetHeightLeftTopWidth(bottom, height, left, right, top, width);
@ -107,8 +107,6 @@ public interface ILocation
detectionConfidence,
height,
Math.Max(rectangle.Left, 0),
Stateless.ILocation.Digits,
Stateless.ILocation.Factor,
Math.Min(rectangle.Right, width),
Math.Max(rectangle.Top, 0),
width,

View File

@ -1,4 +1,5 @@
using System.Text;
using View_by_Distance.Shared.Models.Properties;
namespace View_by_Distance.Shared.Models.Stateless.Methods;
@ -27,7 +28,20 @@ internal abstract class Id
internal static byte GetHasIgnoreKeyword(FilePath filePath) =>
(byte)(filePath.Id > -1 ? 8 : 2);
internal static int GetId(Properties.IPropertyConfiguration propertyConfiguration, string intelligentId)
internal static byte GetHasDateTimeOriginal(IPropertyConfiguration propertyConfiguration, FilePath filePath) =>
(byte)(IsIgnoreOrValidVideoFormatExtension(propertyConfiguration, filePath) ? filePath.Id > -1 ? 6 : 4 : filePath.Id > -1 ? 9 : 1);
private static bool IsIgnoreOrValidVideoFormatExtension(IPropertyConfiguration propertyConfiguration, FilePath filePath) =>
IsIgnoreOrValidVideoFormatExtension(propertyConfiguration, filePath.ExtensionLowered);
private static bool IsIgnoreOrValidVideoFormatExtension(IPropertyConfiguration propertyConfiguration, string extensionLowered) =>
propertyConfiguration.IgnoreExtensions.Contains(extensionLowered)
|| propertyConfiguration.ValidVideoFormatExtensions.Contains(extensionLowered);
internal static byte GetMissingDateTimeOriginal(IPropertyConfiguration propertyConfiguration, FilePath filePath) =>
(byte)(IsIgnoreOrValidVideoFormatExtension(propertyConfiguration, filePath) ? filePath.Id > -1 ? 5 : 0 : filePath.Id > -1 ? 7 : 3);
internal static int GetId(IPropertyConfiguration propertyConfiguration, string intelligentId)
{
int result;
StringBuilder results = new();
@ -44,13 +58,7 @@ internal abstract class Id
return result;
}
internal static byte GetHasDateTimeOriginal(Properties.IPropertyConfiguration propertyConfiguration, FilePath filePath) =>
(byte)(propertyConfiguration.IgnoreExtensions.Contains(filePath.ExtensionLowered) || propertyConfiguration.ValidVideoFormatExtensions.Contains(filePath.ExtensionLowered) ? filePath.Id > -1 ? 6 : 4 : filePath.Id > -1 ? 9 : 1);
internal static byte GetMissingDateTimeOriginal(Properties.IPropertyConfiguration propertyConfiguration, FilePath filePath) =>
(byte)(propertyConfiguration.IgnoreExtensions.Contains(filePath.ExtensionLowered) || propertyConfiguration.ValidVideoFormatExtensions.Contains(filePath.ExtensionLowered) ? filePath.Id > -1 ? 5 : 0 : filePath.Id > -1 ? 7 : 3);
internal static bool NameWithoutExtensionIsIdFormat(Properties.IPropertyConfiguration propertyConfiguration, string fileNameWithoutExtension)
internal static bool NameWithoutExtensionIsIdFormat(IPropertyConfiguration propertyConfiguration, string fileNameWithoutExtension)
{
bool result;
if (fileNameWithoutExtension.Length < 5 || fileNameWithoutExtension.Length > propertyConfiguration.IntMinValueLength)
@ -63,7 +71,7 @@ internal abstract class Id
return result;
}
internal static string GetIntelligentId(Properties.IPropertyConfiguration propertyConfiguration, long id, string extensionLowered, bool? hasIgnoreKeyword, bool? hasDateTimeOriginal)
internal static string GetIntelligentId(IPropertyConfiguration propertyConfiguration, long id, string extensionLowered, bool? hasIgnoreKeyword, bool? hasDateTimeOriginal)
{
string result;
StringBuilder stringBuilder = new();
@ -79,18 +87,18 @@ internal abstract class Id
}
else if (id > -1)
{
if (!propertyConfiguration.ValidVideoFormatExtensions.Contains(extensionLowered))
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 8 : hasDateTimeOriginal.Value ? 9 : 7;
else
if (IsIgnoreOrValidVideoFormatExtension(propertyConfiguration, extensionLowered))
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? throw new NotImplementedException() : hasDateTimeOriginal.Value ? 6 : 5;
else
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 8 : hasDateTimeOriginal.Value ? 9 : 7;
value = id.ToString().PadLeft(propertyConfiguration.IntMinValueLength, '0');
}
else
{
if (!propertyConfiguration.ValidVideoFormatExtensions.Contains(extensionLowered))
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 2 : hasDateTimeOriginal.Value ? 1 : 3;
else
if (IsIgnoreOrValidVideoFormatExtension(propertyConfiguration, extensionLowered))
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? throw new NotImplementedException() : hasDateTimeOriginal.Value ? 4 : 0;
else
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 2 : hasDateTimeOriginal.Value ? 1 : 3;
value = id.ToString()[1..].PadLeft(propertyConfiguration.IntMinValueLength, '0');
}
for (int i = value.Length - propertyConfiguration.ResultAllInOneSubdirectoryLength - 1; i > -1; i--)
@ -101,7 +109,7 @@ internal abstract class Id
return result;
}
internal static string GetPaddedId(Properties.IPropertyConfiguration propertyConfiguration, int id, string extensionLowered, bool? hasIgnoreKeyword, bool? hasDateTimeOriginal, int? index)
internal static string GetPaddedId(IPropertyConfiguration propertyConfiguration, int id, string extensionLowered, bool? hasIgnoreKeyword, bool? hasDateTimeOriginal, int? index)
{
string result;
if (propertyConfiguration.Offset < 0)

View File

@ -136,7 +136,10 @@ internal abstract class Location
result = null;
else
{
if (!int.TryParse(segments[1], out int xWholePercent) || !int.TryParse(segments[2], out int yWholePercent) || !int.TryParse(segments[3], out int wWholePercent) || !int.TryParse(segments[4], out int hWholePercent))
if (!int.TryParse(segments[1], out int xWholePercent)
|| !int.TryParse(segments[2], out int yWholePercent)
|| !int.TryParse(segments[3], out int wWholePercent)
|| !int.TryParse(segments[4], out int hWholePercent))
result = null;
else
{

View File

@ -1,4 +1,5 @@
using System.Collections.ObjectModel;
using System.Diagnostics;
namespace View_by_Distance.Shared.Models.Stateless.Methods;
@ -384,7 +385,12 @@ internal abstract partial class XDirectory
else
{
if (filePath.Id is null)
throw new NullReferenceException(nameof(filePath.Id));
{
if (Debugger.IsAttached)
continue;
else
throw new NullReferenceException(nameof(filePath.Id));
}
intelligentId = IId.GetIntelligentId(propertyConfiguration, filePath.Id.Value, filePath.ExtensionLowered, filePath.HasIgnoreKeyword, filePath.HasDateTimeOriginal);
if (!isOffsetDeterministicHashCode)
checkFile = Path.Combine(directory, $"{intelligentId}{filePath.ExtensionLowered}");

View File

@ -162,8 +162,8 @@ public partial class UnitTestCalculations
width = 100;
height = 100;
Location location = new(bottom, confidence, left, right, top);
_ = new Location(confidence, height, location, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, width, 1);
_ = new Location(bottom, confidence, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
_ = new Location(confidence, height, location, width, 1);
_ = new Location(bottom, confidence, height, left, right, top, width, 1);
NonThrowTryCatch();
}
@ -188,7 +188,7 @@ public partial class UnitTestCalculations
bottom = 50;
width = 100;
height = 100;
location = new(bottom, confidence, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
location = new(bottom, confidence, height, left, right, top, width, 1);
areaPermyriad = IMapping.GetAreaPermyriad(faceAreaPermyriad, height, location, width);
Assert.IsTrue(areaPermyriad == 2500);
left = 0;
@ -197,7 +197,7 @@ public partial class UnitTestCalculations
bottom = 25;
width = 100;
height = 100;
location = new(bottom, confidence, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
location = new(bottom, confidence, height, left, right, top, width, 1);
OutputResolution outputResolution = new(height, 0, width);
areaPermyriad = IMapping.GetAreaPermyriad(faceAreaPermyriad, location, outputResolution);
Assert.IsTrue(areaPermyriad == 625);

View File

@ -87,26 +87,21 @@ public class UnitTestResize
string sourceFileName = "105131603001106320328.jpg";
string sourceDirectoryName = "Mike iCloud Have Date Taken 2022 !9";
Item item;
bool reverse = false;
bool isArchive = false;
FileHolder resizedFileHolder;
long ticks = DateTime.Now.Ticks;
List<string> parseExceptions = [];
string[] changesFrom = [nameof(A_Metadata)];
const bool isValidImageFormatExtension = true;
List<Tuple<string, DateTime>> subFileTuples = [];
int length = _PropertyConfiguration.RootDirectory.Length;
string[] changesFrom = [nameof(A_Property)];
string outputResolution = _Configuration.OutputResolutions[0];
string bResultsFullGroupDirectory = GetResultsFullGroupDirectories();
bool outputResolutionHasNumber = outputResolution.Any(char.IsNumber);
(string cResultsFullGroupDirectory, _, _) = GetResultsFullGroupDirectories(outputResolution);
(string aResultsFullGroupDirectory, string bResultsFullGroupDirectory) = GetResultsFullGroupDirectories();
Shared.Models.Methods.IBlurHasher blurHasher = new BlurHash.Models.C2_BlurHasher(_PropertyConfiguration);
A_Property propertyLogic = GetPropertyLogic(reverse, aResultsFullGroupDirectory);
string aPropertySingletonDirectory = Path.Combine(aResultsFullGroupDirectory, "{}");
if (!Directory.Exists(aPropertySingletonDirectory))
_ = Directory.CreateDirectory(aPropertySingletonDirectory);
(ImageCodecInfo imageCodecInfo, EncoderParameters encoderParameters, string filenameExtension) = C_Resize.GetTuple(_Configuration.OutputExtension, _Configuration.OutputQuality);
B_Metadata metadata = new(null, _PropertyConfiguration, _Configuration.ForceMetadataLastWriteTimeToCreationTime, _Configuration.PropertiesChangedForMetadata, ticks, bResultsFullGroupDirectory);
A_Metadata metadata = new(null, _PropertyConfiguration, _Configuration.ForceMetadataLastWriteTimeToCreationTime, _Configuration.PropertiesChangedForMetadata, ticks, bResultsFullGroupDirectory);
_ = metadata.ToString();
C_Resize resize = new(_PropertyConfiguration, _Configuration.ForceResizeLastWriteTimeToCreationTime, _Configuration.OverrideForResizeImages, _Configuration.PropertiesChangedForResize, _Configuration.ValidResolutions, imageCodecInfo, encoderParameters, filenameExtension);
_ = resize.ToString();
@ -119,8 +114,6 @@ public class UnitTestResize
Assert.IsNotNull(filePath.Id);
string relativePath = IPath.GetRelativePath(fileHolder.FullName, length);
ExifDirectory? exifDirectory = Metadata.Models.Stateless.Methods.IMetadata.GetExifDirectory(filePath);
string propertyLogicSourceDirectory = Path.GetFullPath(Path.Combine(aPropertySingletonDirectory, sourceDirectoryName));
propertyLogic.SetAngleBracketCollection(aResultsFullGroupDirectory, propertyLogicSourceDirectory);
if (outputResolutionHasNumber)
resize.SetAngleBracketCollection(cResultsFullGroupDirectory, sourceDirectory);
resize.Update(cResultsFullGroupDirectory);
@ -144,23 +137,16 @@ public class UnitTestResize
NonThrowTryCatch();
}
private (string, string) GetResultsFullGroupDirectories()
private string GetResultsFullGroupDirectories()
{
string aResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
_PropertyConfiguration,
nameof(A_Property),
string result = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
_Configuration.PropertyConfiguration,
nameof(A_Metadata),
string.Empty,
includeResizeGroup: false,
includeModel: false,
includePredictorModel: false);
string bResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
_PropertyConfiguration,
nameof(B_Metadata),
string.Empty,
includeResizeGroup: false,
includeModel: false,
includePredictorModel: false);
return new(aResultsFullGroupDirectory, bResultsFullGroupDirectory);
return new(result);
}
private (string, string, string) GetResultsFullGroupDirectories(string outputResolution)

View File

@ -68,26 +68,21 @@ public class UnitTestFace
string sourceFileName = "100000507001158650387.jpg";
string sourceDirectoryName = "Facebook/2023.2 Summer Facebook";
Item item;
bool reverse = false;
bool isArchive = false;
FileHolder resizedFileHolder;
long ticks = DateTime.Now.Ticks;
List<string> parseExceptions = [];
string[] changesFrom = [nameof(A_Metadata)];
const bool isValidImageFormatExtension = true;
List<Tuple<string, DateTime>> subFileTuples = [];
int length = _PropertyConfiguration.RootDirectory.Length;
string[] changesFrom = [nameof(A_Property)];
string outputResolution = _Configuration.OutputResolutions[0];
string bResultsFullGroupDirectory = GetResultsFullGroupDirectories();
bool outputResolutionHasNumber = outputResolution.Any(char.IsNumber);
(string cResultsFullGroupDirectory, _, _) = GetResultsFullGroupDirectories(outputResolution);
(string aResultsFullGroupDirectory, string bResultsFullGroupDirectory) = GetResultsFullGroupDirectories();
Shared.Models.Methods.IBlurHasher blurHasher = new BlurHash.Models.C2_BlurHasher(_PropertyConfiguration);
A_Property propertyLogic = GetPropertyLogic(reverse, aResultsFullGroupDirectory);
string aPropertySingletonDirectory = Path.Combine(aResultsFullGroupDirectory, "{}");
if (!Directory.Exists(aPropertySingletonDirectory))
_ = Directory.CreateDirectory(aPropertySingletonDirectory);
(ImageCodecInfo imageCodecInfo, EncoderParameters encoderParameters, string filenameExtension) = C_Resize.GetTuple(_Configuration.OutputExtension, _Configuration.OutputQuality);
B_Metadata metadata = new(null, _PropertyConfiguration, _Configuration.ForceMetadataLastWriteTimeToCreationTime, _Configuration.PropertiesChangedForMetadata, ticks, bResultsFullGroupDirectory);
A_Metadata metadata = new(null, _PropertyConfiguration, _Configuration.ForceMetadataLastWriteTimeToCreationTime, _Configuration.PropertiesChangedForMetadata, ticks, bResultsFullGroupDirectory);
_ = metadata.ToString();
C_Resize resize = new(_PropertyConfiguration, _Configuration.ForceResizeLastWriteTimeToCreationTime, _Configuration.OverrideForResizeImages, _Configuration.PropertiesChangedForResize, _Configuration.ValidResolutions, imageCodecInfo, encoderParameters, filenameExtension);
_ = resize.ToString();
@ -100,8 +95,6 @@ public class UnitTestFace
Assert.IsNotNull(filePath.Id);
string relativePath = IPath.GetRelativePath(fileHolder.FullName, length);
ExifDirectory? exifDirectory = Metadata.Models.Stateless.Methods.IMetadata.GetExifDirectory(filePath);
string propertyLogicSourceDirectory = Path.GetFullPath(Path.Combine(aPropertySingletonDirectory, sourceDirectoryName));
propertyLogic.SetAngleBracketCollection(aResultsFullGroupDirectory, propertyLogicSourceDirectory);
if (outputResolutionHasNumber)
resize.SetAngleBracketCollection(cResultsFullGroupDirectory, sourceDirectory);
resize.Update(cResultsFullGroupDirectory);
@ -134,23 +127,16 @@ public class UnitTestFace
NonThrowTryCatch();
}
private (string, string) GetResultsFullGroupDirectories()
private string GetResultsFullGroupDirectories()
{
string aResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
_PropertyConfiguration,
nameof(A_Property),
string result = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
_Configuration.PropertyConfiguration,
nameof(A_Metadata),
string.Empty,
includeResizeGroup: false,
includeModel: false,
includePredictorModel: false);
string bResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
_PropertyConfiguration,
nameof(B_Metadata),
string.Empty,
includeResizeGroup: false,
includeModel: false,
includePredictorModel: false);
return new(aResultsFullGroupDirectory, bResultsFullGroupDirectory);
return new(result);
}
private (string, string, string) GetResultsFullGroupDirectories(string outputResolution)