fa57861dbf
ILoudnessAlgorithm strategy (RmsLoudnessAlgorithm first impl), WaveformProfileService stores quantized byte[] sidecar in new MediaFileVault (profiles vault), wired into UnifiedTrackService.UploadAsync; failure is logged and swallowed. WaveformProfileDto and WaveformProfileOptions in shared projects.
20 lines
700 B
C#
20 lines
700 B
C#
using DeepDrftContent.FileDatabase.Models;
|
|
|
|
namespace DeepDrftContent.FileDatabase.Services;
|
|
|
|
/// <summary>
|
|
/// Factory for creating media vaults
|
|
/// </summary>
|
|
public static class MediaVaultFactory
|
|
{
|
|
public static async Task<MediaVault?> From(string rootPath, MediaVaultType mediaType, IndexFactoryService? factoryService = null)
|
|
{
|
|
return mediaType switch
|
|
{
|
|
MediaVaultType.Media => await MediaFileVault.FromAsync(rootPath, factoryService),
|
|
MediaVaultType.Image => await ImageVault.FromAsync(rootPath, factoryService),
|
|
MediaVaultType.Audio => await AudioVault.FromAsync(rootPath, factoryService),
|
|
_ => null
|
|
};
|
|
}
|
|
} |