From a37dcc1b451e6d49e086ea5fec724fb3ad4507e8 Mon Sep 17 00:00:00 2001 From: XShine555 Date: Sun, 5 Jul 2026 16:04:53 +0200 Subject: [PATCH] Formatting --- backend/Musify.Api/OpenApi/OpenApiOptionsSetup.cs | 6 +++--- .../PlayLists/RequestPlayListPictureUpload.cs | 2 +- backend/Musify.Application/Tracks/GetTrackStream.cs | 2 +- .../Jobs/TemporalUploadsCleanupJob.cs | 2 +- .../MassTransitDependencyInjection.cs | 12 ++++++------ .../Sagas/PlayListProcessingStateMachine.cs | 2 +- .../MassTransit/Sagas/TrackProcessingStateMachine.cs | 6 +++--- .../Services/AudioTranscoderService.cs | 10 +++++----- .../Musify.Infrastructure/Services/StorageService.cs | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/backend/Musify.Api/OpenApi/OpenApiOptionsSetup.cs b/backend/Musify.Api/OpenApi/OpenApiOptionsSetup.cs index 470bc8f..24e0bab 100644 --- a/backend/Musify.Api/OpenApi/OpenApiOptionsSetup.cs +++ b/backend/Musify.Api/OpenApi/OpenApiOptionsSetup.cs @@ -36,7 +36,7 @@ public sealed class OpenApiOptionsSetup(IOptions op }; return Task.CompletedTask; - }); + } ); options.AddOperationTransformer((operation, context, _) => { @@ -58,9 +58,9 @@ public sealed class OpenApiOptionsSetup(IOptions op { [new OpenApiSecuritySchemeReference(SecuritySchemeId, context.Document)] = _configuration.Scopes.ToList(), - }); + } ); return Task.CompletedTask; - }); + } ); } } diff --git a/backend/Musify.Application/PlayLists/RequestPlayListPictureUpload.cs b/backend/Musify.Application/PlayLists/RequestPlayListPictureUpload.cs index 160683f..539daad 100644 --- a/backend/Musify.Application/PlayLists/RequestPlayListPictureUpload.cs +++ b/backend/Musify.Application/PlayLists/RequestPlayListPictureUpload.cs @@ -84,7 +84,7 @@ namespace Musify.Application.PlayLists await database.SaveChangesAsync(cancellationToken); await transaction.CommitAsync(cancellationToken); - logger.LogInformation("Issued upload intent {IntentId} for user {UserId} (PlayListPicture, temp key: {Key})", intent.Id, request.UserId, tempKey); + logger.LogInformation("Issued upload intent {IntentId} for user {UserId} (PlayListPicture, temp key: {Key} )", intent.Id, request.UserId, tempKey); return new PlayListPictureUploadResponse( intent.Id, diff --git a/backend/Musify.Application/Tracks/GetTrackStream.cs b/backend/Musify.Application/Tracks/GetTrackStream.cs index 98ab662..e69d47f 100644 --- a/backend/Musify.Application/Tracks/GetTrackStream.cs +++ b/backend/Musify.Application/Tracks/GetTrackStream.cs @@ -24,7 +24,7 @@ namespace Musify.Application.Tracks { var track = await database.Tracks.AsNoTracking() .Where(t => t.Id == request.TrackId) - .Select(t => new { t.Id, t.AudioTranscodeProcessingStatus, t.AudioFolderName }) + .Select(t => new { t.Id, t.AudioTranscodeProcessingStatus, t.AudioFolderName } ) .SingleOrDefaultAsync(cancellationToken); if (track is null) diff --git a/backend/Musify.Infrastructure/Jobs/TemporalUploadsCleanupJob.cs b/backend/Musify.Infrastructure/Jobs/TemporalUploadsCleanupJob.cs index 9249073..ee0e0d4 100644 --- a/backend/Musify.Infrastructure/Jobs/TemporalUploadsCleanupJob.cs +++ b/backend/Musify.Infrastructure/Jobs/TemporalUploadsCleanupJob.cs @@ -15,7 +15,7 @@ namespace Musify.Infrastructure.Jobs { protected override async Task ExecuteAsync(CancellationToken stoppingToken) { - logger.LogInformation("TemporalUploadsCleanUpJob started (interval: {Interval}s, prefix: {Prefix})", + logger.LogInformation("TemporalUploadsCleanUpJob started (interval: {Interval}s, prefix: {Prefix} )", uploadIntentConfiguration.TemporalCleanUpJobIntervalSeconds, uploadIntentConfiguration.TemporalRootPrefix); diff --git a/backend/Musify.Infrastructure/MassTransit/DependencyInjection/MassTransitDependencyInjection.cs b/backend/Musify.Infrastructure/MassTransit/DependencyInjection/MassTransitDependencyInjection.cs index 2af7530..ae9df96 100644 --- a/backend/Musify.Infrastructure/MassTransit/DependencyInjection/MassTransitDependencyInjection.cs +++ b/backend/Musify.Infrastructure/MassTransit/DependencyInjection/MassTransitDependencyInjection.cs @@ -27,7 +27,7 @@ namespace Musify.Infrastructure.MassTransit outbox.QueryDelay = TimeSpan.FromSeconds(1); outbox.DuplicateDetectionWindow = TimeSpan.FromMinutes(30); - }); + } ); options.UsingRabbitMq((busRegistrationContext, busFactoryConfigurator) => ConfigureRabbitMqHost( @@ -61,7 +61,7 @@ namespace Musify.Infrastructure.MassTransit outbox.QueryDelay = TimeSpan.FromSeconds(1); outbox.DuplicateDetectionWindow = TimeSpan.FromMinutes(30); - }); + } ); options.SetKebabCaseEndpointNameFormatter(); @@ -73,7 +73,7 @@ namespace Musify.Infrastructure.MassTransit repository.ConcurrencyMode = ConcurrencyMode.Pessimistic; repository.ExistingDbContext(); repository.UsePostgres(); - }); + } ); options.AddSagaStateMachine() .EntityFrameworkRepository(repository => @@ -81,13 +81,13 @@ namespace Musify.Infrastructure.MassTransit repository.ConcurrencyMode = ConcurrencyMode.Pessimistic; repository.ExistingDbContext(); repository.UsePostgres(); - }); + } ); options.AddConfigureEndpointsCallback((registrationContext, _, endpointConfigurator) => { UseStandardRetry(endpointConfigurator); endpointConfigurator.UseEntityFrameworkOutbox(registrationContext); - }); + } ); options.UsingRabbitMq((busRegistrationContext, busFactoryConfigurator) => { @@ -96,7 +96,7 @@ namespace Musify.Infrastructure.MassTransit busRegistrationContext.GetRequiredService()); busFactoryConfigurator.ConfigureEndpoints(busRegistrationContext); - }); + } ); } ); return serviceDescriptors; diff --git a/backend/Musify.Infrastructure/MassTransit/Sagas/PlayListProcessingStateMachine.cs b/backend/Musify.Infrastructure/MassTransit/Sagas/PlayListProcessingStateMachine.cs index c6bd0dd..fa89e46 100644 --- a/backend/Musify.Infrastructure/MassTransit/Sagas/PlayListProcessingStateMachine.cs +++ b/backend/Musify.Infrastructure/MassTransit/Sagas/PlayListProcessingStateMachine.cs @@ -28,7 +28,7 @@ namespace Musify.Infrastructure.MassTransit.Sagas context.Saga.UpdatedAt = DateTime.UtcNow; context.Saga.Bucket = context.Message.Bucket; context.Saga.PictureKey = context.Message.PictureDestinationKey; - }) + } ) .TransitionTo(Processing)); During(Processing, diff --git a/backend/Musify.Infrastructure/MassTransit/Sagas/TrackProcessingStateMachine.cs b/backend/Musify.Infrastructure/MassTransit/Sagas/TrackProcessingStateMachine.cs index faba2e3..9b157fb 100644 --- a/backend/Musify.Infrastructure/MassTransit/Sagas/TrackProcessingStateMachine.cs +++ b/backend/Musify.Infrastructure/MassTransit/Sagas/TrackProcessingStateMachine.cs @@ -33,7 +33,7 @@ namespace Musify.Infrastructure.MassTransit.Sagas context.Saga.Bucket = context.Message.Bucket; context.Saga.PictureKey = context.Message.PictureDestinationKey; context.Saga.AudioKey = context.Message.AudioDestinationKey; - }) + } ) .TransitionTo(Processing)); During(Processing, @@ -42,14 +42,14 @@ namespace Musify.Infrastructure.MassTransit.Sagas { context.Saga.PictureProcessed = true; context.Saga.UpdatedAt = DateTime.UtcNow; - }) + } ) .If(context => context.Saga.AudioProcessed, binder => binder.Finalize()), When(AudioProcessed) .Then(context => { context.Saga.AudioProcessed = true; context.Saga.UpdatedAt = DateTime.UtcNow; - }) + } ) .If(context => context.Saga.PictureProcessed, binder => binder.Finalize()), When(PictureFailed) .Then(context => context.Saga.UpdatedAt = DateTime.UtcNow) diff --git a/backend/Musify.Infrastructure/Services/AudioTranscoderService.cs b/backend/Musify.Infrastructure/Services/AudioTranscoderService.cs index 610c2a4..93cad6f 100644 --- a/backend/Musify.Infrastructure/Services/AudioTranscoderService.cs +++ b/backend/Musify.Infrastructure/Services/AudioTranscoderService.cs @@ -101,7 +101,7 @@ namespace Musify.Infrastructure.Services using var process = BuildProcess(arguments, workingDirectory, redirectStandardInput: true); process.Start(); - logger.LogDebug("[{Operation}] ffmpeg started (PID: {ProcessId}) in {WorkingDirectory}", operationName, process.Id, workingDirectory); + logger.LogDebug("[{Operation}] ffmpeg started (PID: {ProcessId} ) in {WorkingDirectory}", operationName, process.Id, workingDirectory); var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); var errorTask = process.StandardError.ReadToEndAsync(cancellationToken); @@ -124,7 +124,7 @@ namespace Musify.Infrastructure.Services using var process = BuildProcess(arguments, workingDirectory, redirectStandardInput: false); process.Start(); - logger.LogDebug("[{Operation}] ffmpeg started (PID: {ProcessId}) in {WorkingDirectory}", operationName, process.Id, workingDirectory); + logger.LogDebug("[{Operation}] ffmpeg started (PID: {ProcessId} ) in {WorkingDirectory}", operationName, process.Id, workingDirectory); var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); var errorTask = process.StandardError.ReadToEndAsync(cancellationToken); @@ -164,7 +164,7 @@ namespace Musify.Infrastructure.Services } catch (OperationCanceledException) when (!cancellationToken.IsCancellationRequested) { - logger.LogError("[{Operation}] ffmpeg timed out after {Timeout} (PID: {ProcessId})", + logger.LogError("[{Operation}] ffmpeg timed out after {Timeout} (PID: {ProcessId} )", operationName, audioTranscoderConfiguration.TranscodingTimeout, process.Id); TryKillProcess(process); @@ -174,7 +174,7 @@ namespace Musify.Infrastructure.Services var standardError = await errorTask; var standardOutput = await outputTask; - logger.LogDebug("[{Operation}] ffmpeg finished (PID: {ProcessId}). Exit code: {ExitCode}, Output: {OutputLength}B, Error: {ErrorLength}B", + logger.LogDebug("[{Operation}] ffmpeg finished (PID: {ProcessId} ). Exit code: {ExitCode}, Output: {OutputLength}B, Error: {ErrorLength}B", operationName, process.Id, process.ExitCode, standardOutput.Length, standardError.Length); return new FfmpegExecutionResult(process.ExitCode, standardOutput, standardError); @@ -189,7 +189,7 @@ namespace Musify.Infrastructure.Services } catch (Exception exception) { - logger.LogError(exception, "Failed to kill ffmpeg process (PID: {ProcessId})", process.Id); + logger.LogError(exception, "Failed to kill ffmpeg process (PID: {ProcessId} )", process.Id); } } diff --git a/backend/Musify.Infrastructure/Services/StorageService.cs b/backend/Musify.Infrastructure/Services/StorageService.cs index ebbf220..9fb1076 100644 --- a/backend/Musify.Infrastructure/Services/StorageService.cs +++ b/backend/Musify.Infrastructure/Services/StorageService.cs @@ -276,7 +276,7 @@ namespace Musify.Infrastructure.Services { listResponse = await amazonS3.ListObjectsV2Async(listRequest, cancellationToken); - if (listResponse.S3Objects is null or { Count: 0 }) + if (listResponse.S3Objects is null or { Count: 0 } ) break; var deleteRequest = new DeleteObjectsRequest