IDirectory first pass
This commit is contained in:
@ -42,11 +42,9 @@ public class DateGroup
|
||||
Verify(configuration);
|
||||
bool reverse = false;
|
||||
_Configuration = configuration;
|
||||
string outputExtension = ".jpg";
|
||||
if (!_IsEnvironment.Development)
|
||||
throw new Exception("This program only allows development environments!");
|
||||
long ticks = DateTime.Now.Ticks;
|
||||
A_Property propertyLogic = GetPropertyLogic(reverse, outputExtension);
|
||||
string[] dbFiles = Directory.GetFiles(propertyConfiguration.RootDirectory, "*.db", SearchOption.AllDirectories);
|
||||
foreach (string dbFile in dbFiles)
|
||||
File.Delete(dbFile);
|
||||
@ -116,7 +114,10 @@ public class DateGroup
|
||||
// continue;
|
||||
// File.Move(moveBackFileName, checkFile);
|
||||
// }
|
||||
(int j, int f, int t, Container[] containers) = Property.Models.Stateless.Container.GetContainers(propertyConfiguration, propertyLogic);
|
||||
string aResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(_Configuration.PropertyConfiguration, nameof(A_Property));
|
||||
string aPropertySingletonDirectory = Path.Combine(aResultsFullGroupDirectory, "{}");
|
||||
(int f, Container[] containers) = Shared.Models.Stateless.Methods.IContainer.GetContainers(propertyConfiguration, aPropertySingletonDirectory);
|
||||
A_Property propertyLogic = GetPropertyLogic(reverse, aResultsFullGroupDirectory, aResultsFullGroupDirectory);
|
||||
if (propertyLogic.ExceptionsDirectories.Any())
|
||||
throw new Exception();
|
||||
if (propertyConfiguration.PopulatePropertyId && (configuration.ByCreateDateShortcut || configuration.ByHash) && Shared.Models.Stateless.Methods.IProperty.Any(containers))
|
||||
@ -359,12 +360,12 @@ public class DateGroup
|
||||
return results;
|
||||
}
|
||||
|
||||
private A_Property GetPropertyLogic(bool reverse, string outputExtension)
|
||||
private A_Property GetPropertyLogic(bool reverse, string outputExtension, string aResultsFullGroupDirectory)
|
||||
{
|
||||
A_Property result;
|
||||
if (_Configuration?.PropertyConfiguration is null)
|
||||
throw new NullReferenceException(nameof(_Configuration.PropertyConfiguration));
|
||||
result = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, outputExtension, reverse);
|
||||
result = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, outputExtension, reverse, aResultsFullGroupDirectory);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -373,8 +374,7 @@ public class DateGroup
|
||||
List<Item> results = new();
|
||||
foreach (Item item in container.Items)
|
||||
{
|
||||
if (item.ImageFileHolder is not null
|
||||
&& (item.Abandoned is null || !item.Abandoned.Value))
|
||||
if (item.ImageFileHolder is not null)
|
||||
results.Add(item);
|
||||
}
|
||||
return results.ToArray();
|
||||
|
Reference in New Issue
Block a user