Season breakout

DirectoryName to DirectoryFullPath
This commit is contained in:
2024-11-02 14:24:28 -07:00
parent 444e7ed71a
commit 4da353d150
23 changed files with 91 additions and 109 deletions

View File

@ -536,7 +536,7 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
string result;
if (filePaths.Count == 0)
throw new NotSupportedException();
string? sourceDirectory = filePaths[0].DirectoryName;
string? sourceDirectory = filePaths[0].DirectoryFullPath;
if (string.IsNullOrEmpty(sourceDirectory))
throw new NotSupportedException();
Uri uri;
@ -707,7 +707,7 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
filePath = keyValuePair.Value[0];
if (filePath.Id is null)
continue;
directoryNames = keyValuePair.Value.Select(l => l.DirectoryName.Replace('\\', '/')).ToArray();
directoryNames = keyValuePair.Value.Select(l => l.DirectoryFullPath.Replace('\\', '/')).ToArray();
paddedId = IId.GetPaddedId(propertyConfiguration, filePath.Id.Value, filePath.HasIgnoreKeyword, filePath.HasDateTimeOriginal, index: null);
identifier = new(directoryNames, filePath.HasDateTimeOriginal, filePath.Id.Value, filePath.Length, paddedId, filePath.LastWriteTicks);
identifiers.Add(identifier);
@ -1190,7 +1190,7 @@ public partial class DlibDotNet : IDlibDotNet, IDisposable
}
if (resizedFileHolder.Exists && item.FilePath.HasIgnoreKeyword is not null && item.FilePath.HasIgnoreKeyword.Value != shouldIgnore.Value)
{
if (!item.FilePath.DirectoryName.Contains("Results") || !item.FilePath.DirectoryName.Contains("Resize"))
if (!item.FilePath.DirectoryFullPath.Contains("Results") || !item.FilePath.DirectoryFullPath.Contains("Resize"))
throw new NotSupportedException($"Rename File! <{item.FilePath.FileNameFirstSegment}>");
else
{

View File

@ -36,7 +36,7 @@ internal class F_Random
bool immichAssetsCountIsZero = immichAssets.Count == 0;
foreach (Mapping mapping in distinctValidImageMappingCollection)
{
if (mapping.MappingFromItem.FilePath.DirectoryName is null || mapping.MappingFromPerson is null)
if (mapping.MappingFromItem.FilePath.DirectoryFullPath is null || mapping.MappingFromPerson is null)
continue;
if (!idToPersonKeys.TryGetValue(mapping.MappingFromItem.Id, out personKeys))
continue;
@ -104,7 +104,7 @@ internal class F_Random
{
if (distinctCollection.Contains(mapping.MappingFromItem.Id))
continue;
if (mapping.MappingFromItem.FilePath.DirectoryName is null)
if (mapping.MappingFromItem.FilePath.DirectoryFullPath is null)
continue;
if (notNineCollection is not null && notNineCollection.Contains(mapping.MappingFromItem.Id))
continue;