This commit is contained in:
2023-10-15 12:13:48 -07:00
parent cd5ab223c9
commit 37b7ad2a1f
102 changed files with 631 additions and 975 deletions

View File

@ -1,7 +1,6 @@
using ShellProgressBar;
using System.Collections.ObjectModel;
using System.Text.Json;
using View_by_Distance.Distance.Models.Stateless;
using View_by_Distance.FaceRecognitionDotNet;
using View_by_Distance.Property.Models.Stateless;
using View_by_Distance.Shared.Models;
@ -17,7 +16,6 @@ public partial class E_Distance : IDistance<MetadataExtractor.Directory>
private readonly List<string> _Moved;
private readonly List<double?> _Debug;
private readonly List<string> _Renamed;
private readonly Serilog.ILogger? _Log;
private readonly int _FaceConfidencePercent;
private readonly bool _DistanceRenameToMatch;
private readonly bool _DistanceMoveUnableToMatch;
@ -35,7 +33,6 @@ public partial class E_Distance : IDistance<MetadataExtractor.Directory>
_AllMappedFaceFiles = new();
_AllMappedFaceFileNames = new();
_DuplicateMappedFaceFiles = new();
_Log = Serilog.Log.ForContext<E_Distance>();
_DistanceRenameToMatch = distanceRenameToMatch;
_FaceConfidencePercent = faceConfidencePercent;
_DistanceMoveUnableToMatch = distanceMoveUnableToMatch;
@ -298,16 +295,13 @@ public partial class E_Distance : IDistance<MetadataExtractor.Directory>
public void Clear()
{
if (_Log is null)
throw new NullReferenceException(nameof(_Log));
double?[] debug = (from l in _Debug where l is null or not 0 select l).ToArray();
if (debug.Length > 0)
{
string debugMessage = $"{_Debug.Count - debug.Length} - {debug.Min()} - {_Debug.Max()}";
_Log.Info(debugMessage);
}
if (_DuplicateMappedFaceFiles.Count > 0)
_Log.Info($"Renamed {_DuplicateMappedFaceFiles.Count} to *.dup file(s)");
// double?[] debug = (from l in _Debug where l is null or not 0 select l).ToArray();
// if (debug.Length > 0)
// {
// string debugMessage = $"{_Debug.Count - debug.Length} - {debug.Min()} - {_Debug.Max()}";
// }
// if (_DuplicateMappedFaceFiles.Count > 0)
// _Log.Info($"Renamed {_DuplicateMappedFaceFiles.Count} to *.dup file(s)");
if (_Moved.Count > 0 || _Renamed.Count > 0)
throw new NotImplementedException("Restart!");
_Debug.Clear();