a
This commit is contained in:
@ -47,6 +47,7 @@ public class Rename
|
||||
_PropertyConfiguration = propertyConfiguration;
|
||||
_Configuration = configuration;
|
||||
log.Information(propertyConfiguration.RootDirectory);
|
||||
Property.Models.Configuration.Verify(propertyConfiguration, requireExist: false);
|
||||
Verify();
|
||||
List<string> lines = RenameFilesInDirectories(log);
|
||||
if (lines.Any())
|
||||
@ -81,7 +82,6 @@ public class Rename
|
||||
ProgressBar progressBar;
|
||||
List<Record> records = new();
|
||||
const string fileSearchFilter = "*";
|
||||
int offset = IDirectory.GetOffset();
|
||||
const bool useCeilingAverage = false;
|
||||
const string directorySearchFilter = "*";
|
||||
List<string> distinctDirectories = new();
|
||||
@ -115,12 +115,12 @@ public class Rename
|
||||
progressBar = new(files.Length, message, options);
|
||||
nefPresentCheck = files.Any(l => l.EndsWith(".NEF"));
|
||||
if (!nefPresentCheck)
|
||||
records.AddRange(GetRecords(metadata, offset + records.Count, progressBar, files));
|
||||
records.AddRange(GetRecords(metadata, _PropertyConfiguration.Offset + records.Count, progressBar, files));
|
||||
else
|
||||
{
|
||||
if (!nefPresent)
|
||||
nefPresent = true;
|
||||
records.AddRange(GetRecords(metadata, offset + records.Count, progressBar, (from l in files where l.EndsWith(".JPG") select l).ToArray()));
|
||||
records.AddRange(GetRecords(metadata, _PropertyConfiguration.Offset + records.Count, progressBar, (from l in files where l.EndsWith(".JPG") select l).ToArray()));
|
||||
}
|
||||
}
|
||||
progressBar.Dispose();
|
||||
@ -226,7 +226,7 @@ public class Rename
|
||||
bool nameWithoutExtensionIsIdFormat;
|
||||
bool nameWithoutExtensionIsPaddedIdFormat;
|
||||
IReadOnlyList<MetadataExtractor.Directory> directories;
|
||||
int sortOrderOnlyLengthIndex = IDirectory.GetSortOrderOnlyLengthIndex();
|
||||
int sortOrderOnlyLengthIndex = IDirectory.GetSortOrderOnlyLengthIndex(_PropertyConfiguration.Offset);
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
progressBar.Tick();
|
||||
|
Reference in New Issue
Block a user