diff --git a/.vscode/launch.json b/.vscode/launch.json index cba86c1..677e4be 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -398,4 +398,13 @@ // '98' // C:\Program Files\ImageMagick-7.1.0-Q16-HDRI>identify -format '%Q' "D:\7) Question\- - - Images\Mike Goolgle Photos 2014\197616258.jpg" // '90' -// dotnet dead-csharp --inputs "**/*.cs" --excludes "**/obj/**" "**/I*.cs" "**/UnitTest*.cs" \ No newline at end of file +// dotnet dead-csharp --inputs "**/*.cs" --excludes "**/obj/**" "**/I*.cs" "**/UnitTest*.cs" +// " - Shortcut (2)" +// _ Manual Copy Successful +// # Don't know full birthday +// ] Match +// ^ Know birthday +// _ Import of Partial info +// ` Want to find +// ~ Approxomite age +// + Approxomite age and have at least one image \ No newline at end of file diff --git a/Instance/appsettings.Development.json b/Instance/appsettings.Development.json index 48e10f3..ea33566 100644 --- a/Instance/appsettings.Development.json +++ b/Instance/appsettings.Development.json @@ -33,6 +33,9 @@ "CopyFacesAndSaveFaceLandmarkForOutputResolutions": [ "Original" ], + "xJLinks": [ + "Julie" + ], "JLinks": [ "Mike Phares Jr" ], @@ -53,7 +56,7 @@ ], "RangeDistanceTolerance": [ 0, - 0.98, + 0.6, 1.8 ], "RangeFaceAreaTolerance": [ diff --git a/Map/Models/MapLogic.cs b/Map/Models/MapLogic.cs index d026f76..7b60440 100644 --- a/Map/Models/MapLogic.cs +++ b/Map/Models/MapLogic.cs @@ -140,6 +140,7 @@ public class MapLogic : Shared.Models.Methods.IMapLogic const int zero = 0; List? collection; PersonBirthday personBirthday; + List shouldMove = new(); foreach (KeyValuePair> idToCollection in _IdThenNormalizedRectangleToPersonContainers) { foreach (KeyValuePair normalizedRectangleToPersonContainers in idToCollection.Value) @@ -148,6 +149,8 @@ public class MapLogic : Shared.Models.Methods.IMapLogic { if (personContainer.Key is null || personContainer.Birthdays is null || !personContainer.Birthdays.Any()) continue; + if (personContainer.DisplayDirectoryName.Contains(@"{}\~\")) + shouldMove.Add(personContainer.DisplayDirectoryName); personBirthday = personContainer.Birthdays[zero]; personKey = personBirthday.Value.Ticks; if (!results.TryGetValue(personKey, out collection)) @@ -162,6 +165,8 @@ public class MapLogic : Shared.Models.Methods.IMapLogic } } } + if (shouldMove.Any()) + throw new Exception(string.Join(Environment.NewLine, shouldMove)); return results; } @@ -751,7 +756,7 @@ public class MapLogic : Shared.Models.Methods.IMapLogic Dictionary? normalizedRectangleToMapping; string by = nameof(Shared.Models.Stateless.IMapLogic.ManualCopy); Dictionary? normalizedRectangleToPeronContainerCollection; - string successfull = $"_ {nameof(Shared.Models.Stateless.IMapLogic.ManualCopy).Humanize(LetterCasing.Title)} Successfull"; + string successful = $"_ {nameof(Shared.Models.Stateless.IMapLogic.ManualCopy).Humanize(LetterCasing.Title)} Successful"; foreach (KeyValuePair personKeyToPersonContainer in _PersonKeyToPersonContainer) { if (personKeyToPersonContainer.Value.Key is null || personKeyToPersonContainer.Value.Birthdays is null || !personKeyToPersonContainer.Value.Birthdays.Any()) @@ -798,9 +803,9 @@ public class MapLogic : Shared.Models.Methods.IMapLogic if (!File.Exists(checkFile)) File.Copy(personDisplayDirectoryAllFile, checkFile); } - if (personDisplayDirectoryAllFile.Contains(successfull)) + if (personDisplayDirectoryAllFile.Contains(successful)) continue; - directoryName = Path.Combine(personDisplayDirectory, successfull); + directoryName = Path.Combine(personDisplayDirectory, successful); if (!Directory.Exists(directoryName)) _ = Directory.CreateDirectory(directoryName); checkFile = Path.Combine(directoryName, personDisplayFileName); diff --git a/Tests/UnitTestCalculations.cs b/Tests/UnitTestCalculations.cs index a1040b2..9bbc4a2 100644 --- a/Tests/UnitTestCalculations.cs +++ b/Tests/UnitTestCalculations.cs @@ -134,8 +134,8 @@ public partial class UnitTestCalculations [TestMethod] public void TestMethodHumanize() { - string successfull = $"_ {"ManualCopy".Humanize(LetterCasing.Title)} Successfull"; - Assert.IsTrue(successfull == "_ Manual Copy Successfull"); + string successful = $"_ {"ManualCopy".Humanize(LetterCasing.Title)} Successful"; + Assert.IsTrue(successful == "_ Manual Copy Successful"); } [TestMethod]