Work with video

This commit is contained in:
2024-01-27 18:11:24 -07:00
parent cfe43360fc
commit 4081a73b9d
20 changed files with 210 additions and 165 deletions

View File

@ -62,14 +62,19 @@ internal abstract class Id
return result;
}
internal static string GetPaddedId(Properties.IPropertyConfiguration propertyConfiguration, int index, int id)
internal static string GetPaddedId(Properties.IPropertyConfiguration propertyConfiguration, int id, int? index)
{
string result;
string intelligentId = GetIntelligentId(propertyConfiguration, id, ignore: false);
int check = GetId(propertyConfiguration, intelligentId);
if (check != id)
throw new NotSupportedException();
result = $"{propertyConfiguration.Offset + index}{intelligentId}";
if (propertyConfiguration.Offset < 0)
result = Guid.NewGuid().ToString();
else
{
string intelligentId = GetIntelligentId(propertyConfiguration, id, ignore: false);
int check = GetId(propertyConfiguration, intelligentId);
if (check != id)
throw new NotSupportedException();
result = index is null || propertyConfiguration.Offset == 9876543 ? intelligentId : $"{propertyConfiguration.Offset + index}{intelligentId}";
}
return result;
}