IntelligentIdRecord
This commit is contained in:
@ -147,7 +147,7 @@ public class A_Metadata
|
||||
ReadOnlyCollection<string> ffmpegFiles;
|
||||
DeterministicHashCode deterministicHashCode;
|
||||
FilePath filePath = IId.GetFilePath(renameConfiguration.MetadataConfiguration, file);
|
||||
if (!renameConfiguration.SkipIdFiles || filePath.Id is null || !filePath.IsIdFormat && !filePath.IsPaddedIdFormat)
|
||||
if (!renameConfiguration.SkipIdFiles || filePath.Id is null || !filePath.IsIntelligentIdFormat && filePath.SortOrder is not null)
|
||||
{
|
||||
(ffmpegFiles, ffmpegFilePath) = rename.ConvertAndGetFfmpegFiles(renameConfiguration, filePath);
|
||||
if (ffmpegFilePath is not null)
|
||||
|
@ -9,6 +9,7 @@ public class MetadataConfiguration
|
||||
|
||||
public bool? ForceMetadataLastWriteTimeToCreationTime { get; set; }
|
||||
public string[]? IgnoreRulesKeyWords { get; set; }
|
||||
public int? IntMinValueLength { get; set; }
|
||||
public int? Offset { get; set; }
|
||||
public bool? PropertiesChangedForMetadata { get; set; }
|
||||
|
||||
@ -38,6 +39,7 @@ public class MetadataConfiguration
|
||||
|
||||
private static void Verify(MetadataConfiguration configuration)
|
||||
{
|
||||
if (configuration.IntMinValueLength is null || configuration.IntMinValueLength != int.MinValue.ToString().Length) throw new NotSupportedException(nameof(configuration.IgnoreRulesKeyWords));
|
||||
if (configuration.IgnoreRulesKeyWords is null || configuration.IgnoreRulesKeyWords.Length == 0) throw new NullReferenceException(nameof(configuration.IgnoreRulesKeyWords));
|
||||
}
|
||||
|
||||
@ -46,6 +48,7 @@ public class MetadataConfiguration
|
||||
Shared.Models.MetadataConfiguration result;
|
||||
if (configuration is null) throw new NullReferenceException(nameof(configuration));
|
||||
if (configuration.ForceMetadataLastWriteTimeToCreationTime is null) throw new NullReferenceException(nameof(configuration.ForceMetadataLastWriteTimeToCreationTime));
|
||||
if (configuration.IntMinValueLength is null) throw new NullReferenceException(nameof(configuration.IntMinValueLength));
|
||||
if (configuration.IgnoreRulesKeyWords is null) throw new NullReferenceException(nameof(configuration.IgnoreRulesKeyWords));
|
||||
if (configuration.Offset is null) throw new NullReferenceException(nameof(configuration.Offset));
|
||||
if (configuration.PropertiesChangedForMetadata is null) throw new NullReferenceException(nameof(configuration.PropertiesChangedForMetadata));
|
||||
@ -53,6 +56,7 @@ public class MetadataConfiguration
|
||||
result = new(resultConfiguration,
|
||||
configuration.ForceMetadataLastWriteTimeToCreationTime.Value,
|
||||
configuration.IgnoreRulesKeyWords,
|
||||
configuration.IntMinValueLength.Value,
|
||||
configuration.Offset.Value,
|
||||
configuration.PropertiesChangedForMetadata.Value);
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user