diff --git a/TASVideos.Parsers/Result/ErrorResult.cs b/TASVideos.Parsers/Result/ErrorResult.cs index 7f708db12..098c8b0c1 100644 --- a/TASVideos.Parsers/Result/ErrorResult.cs +++ b/TASVideos.Parsers/Result/ErrorResult.cs @@ -18,4 +18,5 @@ internal class ErrorResult(string errorMsg) : IParseResult public double? FrameRateOverride => null; public long? CycleCount => null; public string? Annotations => null; + public Dictionary Hashes => []; } diff --git a/TASVideos.Parsers/Result/IParseResult.cs b/TASVideos.Parsers/Result/IParseResult.cs index d5447f45f..4bb5a56db 100644 --- a/TASVideos.Parsers/Result/IParseResult.cs +++ b/TASVideos.Parsers/Result/IParseResult.cs @@ -73,4 +73,11 @@ public interface IParseResult /// Gets the annotations. These can be general comments, or other user entered descriptions supported by the file format. /// string? Annotations { get; } + + Dictionary Hashes { get; } +} + +public enum HashType +{ + Md5, Sha1, Sha256, Crc32 } diff --git a/TASVideos.Parsers/Result/SuccessResult.cs b/TASVideos.Parsers/Result/SuccessResult.cs index 1356d6feb..69b11fdf1 100644 --- a/TASVideos.Parsers/Result/SuccessResult.cs +++ b/TASVideos.Parsers/Result/SuccessResult.cs @@ -20,6 +20,8 @@ internal class SuccessResult(string fileExtension) : IParseResult public string? Annotations { get; internal set; } internal List WarningList { get; } = []; + + public Dictionary Hashes { get; } = []; } internal static class ParseResultExtensions diff --git a/tests/TASVideos.Core.Tests/Services/TestParseResult.cs b/tests/TASVideos.Core.Tests/Services/TestParseResult.cs index a70ba3286..4df3090e1 100644 --- a/tests/TASVideos.Core.Tests/Services/TestParseResult.cs +++ b/tests/TASVideos.Core.Tests/Services/TestParseResult.cs @@ -16,4 +16,5 @@ internal class TestParseResult : IParseResult public double? FrameRateOverride { get; init; } public long? CycleCount { get; init; } public string? Annotations { get; init; } + public Dictionary Hashes { get; init; } = new Dictionary(); } diff --git a/tests/TASVideos.Core.Tests/Services/UserFilesTests.cs b/tests/TASVideos.Core.Tests/Services/UserFilesTests.cs index afdc0eac4..01f0e9822 100644 --- a/tests/TASVideos.Core.Tests/Services/UserFilesTests.cs +++ b/tests/TASVideos.Core.Tests/Services/UserFilesTests.cs @@ -256,5 +256,6 @@ private class TestParseResult : IParseResult public double? FrameRateOverride => null; public long? CycleCount => null; public string? Annotations => null; + public Dictionary Hashes { get; init; } = new Dictionary(); } }