Streaming Seek Support
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user