added-logic-to-rename-to-3-and-7-like-should-ignore-for-missing-date-time-original

This commit is contained in:
2025-03-16 22:22:29 -07:00
parent c15c854481
commit ae23e803fa
7 changed files with 78 additions and 54 deletions

View File

@ -28,9 +28,9 @@ internal abstract class Id
_ = results.Append(intelligentId[i]);
_ = results.Append(intelligentId[^3]).Append(intelligentId[^2]);
result = int.Parse(results.ToString());
if (intelligentId[^1] is '1' or '2')
if (intelligentId[^1] is '1' or '2' or '3')
result *= -1;
else if (intelligentId[^1] is not '9' and not '8')
else if (intelligentId[^1] is not '9' and not '8' and not '7')
throw new NotSupportedException();
return result;
}
@ -48,12 +48,12 @@ internal abstract class Id
List<char> resultAllInOneSubdirectoryChars = [];
if (id > -1)
{
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 8 : 9;
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 8 : hasDateTimeOriginal is not null && hasDateTimeOriginal.Value ? 9 : 7;
value = id.ToString().PadLeft(metadataSettings.IntMinValueLength, '0');
}
else
{
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 2 : 1;
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 2 : hasDateTimeOriginal is not null && hasDateTimeOriginal.Value ? 1 : 3;
value = id.ToString()[1..].PadLeft(metadataSettings.IntMinValueLength, '0');
}
for (int i = value.Length - resultSettings.ResultAllInOneSubdirectoryLength - 1; i > -1; i--)