Streaming Seek Support

This commit is contained in:
daniel-c-harvey
2025-12-07 04:44:54 -05:00
parent 8c58edd5f9
commit 20db222a0f
12 changed files with 493 additions and 26 deletions
+5 -1
View File
@@ -1,3 +1,4 @@
using DeepDrftContent.Services.Audio;
using DeepDrftContent.Services.Constants;
using DeepDrftContent.Services.FileDatabase.Models;
using DeepDrftContent.Services.FileDatabase.Services;
@@ -9,13 +10,16 @@ namespace DeepDrftContent
{
public static async Task ConfigureDomainServices(WebApplicationBuilder builder)
{
// Audio services
builder.Services.AddSingleton<WavOffsetService>();
// File Database
builder.Configuration.AddJsonFile("environment/filedatabase.json", optional: false, reloadOnChange: true);
var fileDatabaseSettings = builder.Configuration.GetSection(nameof(FileDatabaseSettings)).Get<FileDatabaseSettings>();
if (fileDatabaseSettings is null) { throw new Exception("File database settings are not configured"); }
var fileDatabase = await FileDatabase.FromAsync(fileDatabaseSettings.VaultPath);
if (fileDatabase is null) { throw new Exception("Unable to initialize file database"); }
if (fileDatabase is null) { throw new Exception("Unable to initialize file database"); }
builder.Services.AddSingleton(fileDatabase);
await InitializeTrackVault(fileDatabase);
}