mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-21 14:25:03 +00:00
Allow sizeless ROMs if there's a SHA-1 or SHA-256
This commit is contained in:
@@ -88,7 +88,7 @@ namespace SabreTools.Metadata.DatFiles.Formats
|
||||
case Rom rom:
|
||||
if (string.IsNullOrEmpty(rom.Name))
|
||||
missingFields.Add(nameof(Data.Models.Metadata.Rom.Name));
|
||||
if (rom.Size is null || rom.Size < 0)
|
||||
if ((rom.Size is null || rom.Size < 0) && rom.SHA1 is null && rom.SHA256 is null)
|
||||
missingFields.Add(nameof(Data.Models.Metadata.Rom.Size));
|
||||
if (string.IsNullOrEmpty(rom.BLAKE3)
|
||||
&& string.IsNullOrEmpty(rom.CRC16)
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace SabreTools.Metadata.DatFiles.Formats
|
||||
case Rom rom:
|
||||
if (string.IsNullOrEmpty(rom.Name))
|
||||
missingFields.Add(nameof(Data.Models.Metadata.Rom.Name));
|
||||
if (rom.Size is null || rom.Size < 0)
|
||||
if ((rom.Size is null || rom.Size < 0) && rom.SHA1 is null && rom.SHA256 is null)
|
||||
missingFields.Add(nameof(Data.Models.Metadata.Rom.Size));
|
||||
if (string.IsNullOrEmpty(rom.BLAKE3)
|
||||
&& string.IsNullOrEmpty(rom.CRC16)
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace SabreTools.Metadata.DatFiles.Formats
|
||||
case Rom rom:
|
||||
if (string.IsNullOrEmpty(rom.Name))
|
||||
missingFields.Add(nameof(Data.Models.Metadata.Rom.Name));
|
||||
if (rom.Size is null || rom.Size < 0)
|
||||
if ((rom.Size is null || rom.Size < 0) && rom.SHA1 is null && rom.SHA256 is null)
|
||||
missingFields.Add(nameof(Data.Models.Metadata.Rom.Size));
|
||||
if (string.IsNullOrEmpty(rom.CRC32)
|
||||
&& string.IsNullOrEmpty(rom.MD5)
|
||||
|
||||
Reference in New Issue
Block a user