mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Make AACS a bit easier to follow
This commit is contained in:
@@ -14,12 +14,11 @@ namespace BinaryObjectScanner.FileType
|
||||
/// <inheritdoc/>
|
||||
public override string? Detect(Stream stream, string file, bool includeDebug)
|
||||
{
|
||||
// Derive the version, if possible
|
||||
var typeAndVersion = Array.Find(_wrapper.Records ?? [], r => r?.RecordType == SabreTools.Models.AACS.RecordType.TypeAndVersion);
|
||||
if (typeAndVersion == null)
|
||||
return "AACS (Unknown Version)";
|
||||
else
|
||||
return $"AACS {(typeAndVersion as SabreTools.Models.AACS.TypeAndVersionRecord)?.VersionNumber}";
|
||||
var record = Array.Find(_wrapper.Records, r => r.RecordType == SabreTools.Models.AACS.RecordType.TypeAndVersion);
|
||||
if (record is SabreTools.Models.AACS.TypeAndVersionRecord tavr)
|
||||
return $"AACS {tavr.VersionNumber}";
|
||||
|
||||
return "AACS (Unknown Version)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user