FilePath ready to test
This commit is contained in:
@ -16,7 +16,7 @@ public class B_Metadata : IMetadata<MetadataExtractor.Directory>
|
||||
private readonly bool _PropertiesChangedForMetadata;
|
||||
private readonly IPropertyConfiguration _PropertyConfiguration;
|
||||
private readonly bool _ForceMetadataLastWriteTimeToCreationTime;
|
||||
private readonly IReadOnlyDictionary<string, string[]> _FileGroups;
|
||||
private readonly ReadOnlyDictionary<string, string[]> _FileGroups;
|
||||
private readonly JsonSerializerOptions _WriteIndentedJsonSerializerOptions;
|
||||
|
||||
public B_Metadata(IPropertyConfiguration propertyConfiguration)
|
||||
@ -43,12 +43,12 @@ public class B_Metadata : IMetadata<MetadataExtractor.Directory>
|
||||
return result;
|
||||
}
|
||||
|
||||
public ReadOnlyDictionary<string, MetadataExtractorDirectory> GetMetadataCollection(List<Tuple<string, DateTime>> subFileTuples, List<string> parseExceptions, string[] changesFrom, MappingFromItem mappingFromItem)
|
||||
public ReadOnlyDictionary<string, MetadataExtractorDirectory> GetMetadataCollection(FilePath filePath, List<Tuple<string, DateTime>> subFileTuples, List<string> parseExceptions, string[] changesFrom, MappingFromItem mappingFromItem)
|
||||
{
|
||||
Dictionary<string, MetadataExtractorDirectory>? results = null;
|
||||
string json = string.Empty;
|
||||
List<DateTime> dateTimes = (from l in subFileTuples where changesFrom.Contains(l.Item1) select l.Item2).ToList();
|
||||
(_, int directoryIndex) = Shared.Models.Stateless.Methods.IPath.GetDirectoryNameAndIndex(_PropertyConfiguration.ResultAllInOneSubdirectoryLength, mappingFromItem.ImageFileHolder.Name);
|
||||
(_, int directoryIndex) = Shared.Models.Stateless.Methods.IPath.GetDirectoryNameAndIndex(_PropertyConfiguration, filePath);
|
||||
FileInfo fileInfo = new(Path.Combine(_FileGroups[_PropertyConfiguration.ResultSingleton][directoryIndex], $"{mappingFromItem.ImageFileHolder.NameWithoutExtension}{mappingFromItem.ImageFileHolder.ExtensionLowered}.json"));
|
||||
if (_ForceMetadataLastWriteTimeToCreationTime && !fileInfo.Exists && File.Exists(Path.ChangeExtension(fileInfo.FullName, ".delete")))
|
||||
{
|
||||
|
Reference in New Issue
Block a user