Phase 9 Wave 2: api/release endpoint family — medium-aware reads + metadata writes
Adds ReleaseRepository/ReleaseManager (IReleaseService) for paged medium-filtered release reads and Session/Mix satellite writes, UnifiedReleaseService orchestrating vault+SQL, and ReleaseController (5 endpoints). Refactors WaveformProfileService for configurable bucketCount/vaultName (backward-compatible) and adds the mix-waveforms vault. Promotes brittle error-string literals to named constants (MixHasNoTrackMessage, MixTrackNoAudioMessage) on UnifiedReleaseService.
This commit is contained in:
@@ -43,6 +43,7 @@ namespace DeepDrftAPI
|
||||
if (db is null) throw new Exception("Unable to initialize file database");
|
||||
InitializeTrackVault(db).GetAwaiter().GetResult();
|
||||
InitializeImageVault(db).GetAwaiter().GetResult();
|
||||
InitializeMixWaveformsVault(db).GetAwaiter().GetResult();
|
||||
return db;
|
||||
});
|
||||
|
||||
@@ -64,5 +65,14 @@ namespace DeepDrftAPI
|
||||
await fileDatabase.CreateVaultAsync(VaultConstants.Images, MediaVaultType.Image);
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure the mix-waveforms vault exists. Holds high-resolution waveform datums for DJ Mix releases.
|
||||
private static async Task InitializeMixWaveformsVault(FileDatabase fileDatabase)
|
||||
{
|
||||
if (!fileDatabase.HasVault(VaultConstants.MixWaveforms))
|
||||
{
|
||||
await fileDatabase.CreateVaultAsync(VaultConstants.MixWaveforms, MediaVaultType.Media);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user