refactor(backend): group track pipeline state into owned types
Track mixed catalog fields (Title, Artist credit, Duration) with picture-processing and audio-transcode pipeline state as ten flat columns plus two computed [NotMapped] flags, making the entity read like a media-pipeline worksheet. Introduce TrackPictures and TrackAudio as EF owned types mapped onto the same existing columns (explicit column names, no schema change - verified via `dotnet ef migrations has-pending-model-changes`). Track now reads as Title/Artist/Duration/Pictures/Audio instead of fourteen loose properties.
This commit is contained in:
+2
-2
@@ -32,7 +32,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Audio
|
||||
|
||||
try
|
||||
{
|
||||
track.AudioTranscodeProcessingStatus = ProcessingStatus.Processing;
|
||||
track.Audio.TranscodeStatus = ProcessingStatus.Processing;
|
||||
var folderName = Guid.NewGuid().ToString();
|
||||
var sourceFileName = Path.GetFileName(executeContext.Arguments.SourceKey);
|
||||
var workingDirectory = Path.Combine(executeContext.Arguments.TemporaryRootDirectory, folderName);
|
||||
@@ -57,7 +57,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Audio
|
||||
|
||||
try
|
||||
{
|
||||
track.AudioTranscodeProcessingStatus = ProcessingStatus.Failed;
|
||||
track.Audio.TranscodeStatus = ProcessingStatus.Failed;
|
||||
await database.SaveChangesAsync(executeContext.CancellationToken);
|
||||
}
|
||||
catch (Exception dbException)
|
||||
|
||||
Reference in New Issue
Block a user