fix management of fmp4 init segments (#2546)

This commit is contained in:
Jason Dove
2025-10-18 22:52:45 -05:00
committed by GitHub
parent 35e7922836
commit 889904e70d
13 changed files with 185 additions and 106 deletions
+11 -1
View File
@@ -1,4 +1,6 @@
using Bugsnag;
using System.Diagnostics.CodeAnalysis;
using System.Security.Cryptography;
using Bugsnag;
using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Interfaces.Metadata;
using Microsoft.Extensions.Logging;
@@ -158,4 +160,12 @@ public class LocalFileSystem(IClient client, ILogger<LocalFileSystem> logger) :
public Task<string> ReadAllText(string path) => File.ReadAllTextAsync(path);
public Task<string[]> ReadAllLines(string path) => File.ReadAllLinesAsync(path);
[SuppressMessage("Security", "CA5351:Do Not Use Broken Cryptographic Algorithms")]
public async Task<byte[]> GetHash(string path)
{
using var md5 = MD5.Create();
await using var stream = File.OpenRead(path);
return await md5.ComputeHashAsync(stream);
}
}