Work with video
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user