From 130f23f841ed6956d56c7357212b1d524e93dfff Mon Sep 17 00:00:00 2001 From: XShine555 Date: Thu, 28 May 2026 21:07:49 +0200 Subject: [PATCH] Change on files --- Application/Contracts/IStorageService.cs | 2 +- Application/Contracts/StorageObject.cs | 4 ++++ Application/Events/CreatePlayListResourcesEvent.cs | 2 +- Application/Events/CreateTrackResourcesEvent.cs | 2 +- Application/Events/UpdatePlayListPictureEvent.cs | 2 +- Application/Events/UpdatePlayListPictureSourceEvent.cs | 2 +- Application/Events/UpdateTrackPictureEvent.cs | 2 +- .../PlayLists/Handlers/CreatePlayListCommandHandler.cs | 2 +- .../PlayLists/Handlers/UpdatePlayListCommandHandler.cs | 2 +- Application/{Common => Shared}/ImageSize.cs | 2 +- Application/Tracks/Handlers/CreateTrackCommandHandler.cs | 2 +- .../PublishPlayListPictureProcessingEventArguments.cs | 2 +- .../Arguments/PublishTrackProcessingEventsArguments.cs | 2 +- .../RoutingSlip/Builders/PictureWorkflowRoutingSlipBuilder.cs | 2 +- .../Builders/PlayListPictureSourceRoutingSlipBuilder.cs | 2 +- Infrastructure/Services/StorageService.cs | 4 ++-- 16 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 Application/Contracts/StorageObject.cs rename Application/{Common => Shared}/ImageSize.cs (71%) diff --git a/Application/Contracts/IStorageService.cs b/Application/Contracts/IStorageService.cs index 2a29c15..02fe1f1 100644 --- a/Application/Contracts/IStorageService.cs +++ b/Application/Contracts/IStorageService.cs @@ -23,6 +23,6 @@ namespace Musify.Application.Contracts Task RemoveFolderAsync(string bucket, string folderKey, CancellationToken cancellationToken); - IAsyncEnumerable<(string Key, DateTime LastModifiedUtc)> ListObjectsAsync(string bucket, string prefix, CancellationToken cancellationToken); + IAsyncEnumerable ListObjectsAsync(string bucket, string prefix, CancellationToken cancellationToken); } } \ No newline at end of file diff --git a/Application/Contracts/StorageObject.cs b/Application/Contracts/StorageObject.cs new file mode 100644 index 0000000..2ec4d45 --- /dev/null +++ b/Application/Contracts/StorageObject.cs @@ -0,0 +1,4 @@ +namespace Musify.Application.Contracts +{ + public record StorageObject(string Key, DateTime LastModifiedUtc); +} diff --git a/Application/Events/CreatePlayListResourcesEvent.cs b/Application/Events/CreatePlayListResourcesEvent.cs index 3954a90..80266cb 100644 --- a/Application/Events/CreatePlayListResourcesEvent.cs +++ b/Application/Events/CreatePlayListResourcesEvent.cs @@ -1,4 +1,4 @@ -using Musify.Application.Common; +using Musify.Application.Shared; namespace Musify.Application.Events { diff --git a/Application/Events/CreateTrackResourcesEvent.cs b/Application/Events/CreateTrackResourcesEvent.cs index 2482d25..e7f08b5 100644 --- a/Application/Events/CreateTrackResourcesEvent.cs +++ b/Application/Events/CreateTrackResourcesEvent.cs @@ -1,4 +1,4 @@ -using Musify.Application.Common; +using Musify.Application.Shared; namespace Musify.Application.Events { diff --git a/Application/Events/UpdatePlayListPictureEvent.cs b/Application/Events/UpdatePlayListPictureEvent.cs index 2a3e760..d617c75 100644 --- a/Application/Events/UpdatePlayListPictureEvent.cs +++ b/Application/Events/UpdatePlayListPictureEvent.cs @@ -1,4 +1,4 @@ -using Musify.Application.Common; +using Musify.Application.Shared; namespace Musify.Application.Events { diff --git a/Application/Events/UpdatePlayListPictureSourceEvent.cs b/Application/Events/UpdatePlayListPictureSourceEvent.cs index fdc7cbd..24c7101 100644 --- a/Application/Events/UpdatePlayListPictureSourceEvent.cs +++ b/Application/Events/UpdatePlayListPictureSourceEvent.cs @@ -1,4 +1,4 @@ -using Musify.Application.Common; +using Musify.Application.Shared; namespace Musify.Application.Events { diff --git a/Application/Events/UpdateTrackPictureEvent.cs b/Application/Events/UpdateTrackPictureEvent.cs index 3fd0547..8973e64 100644 --- a/Application/Events/UpdateTrackPictureEvent.cs +++ b/Application/Events/UpdateTrackPictureEvent.cs @@ -1,4 +1,4 @@ -using Musify.Application.Common; +using Musify.Application.Shared; namespace Musify.Application.Events { diff --git a/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs b/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs index 1b7d894..38f43c4 100644 --- a/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs +++ b/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs @@ -3,7 +3,7 @@ using Mediator; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Musify.Application.Configuration; -using Musify.Application.Common; +using Musify.Application.Shared; using Musify.Application.Events; using Musify.Application.PlayLists.Commands; using Musify.Application.PlayLists.Responses; diff --git a/Application/PlayLists/Handlers/UpdatePlayListCommandHandler.cs b/Application/PlayLists/Handlers/UpdatePlayListCommandHandler.cs index 45f01b8..c099d5e 100644 --- a/Application/PlayLists/Handlers/UpdatePlayListCommandHandler.cs +++ b/Application/PlayLists/Handlers/UpdatePlayListCommandHandler.cs @@ -3,7 +3,7 @@ using Mediator; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Musify.Application.Configuration; -using Musify.Application.Common; +using Musify.Application.Shared; using Musify.Application.Events; using Musify.Application.PlayLists.Commands; using Musify.Application.PlayLists.Responses; diff --git a/Application/Common/ImageSize.cs b/Application/Shared/ImageSize.cs similarity index 71% rename from Application/Common/ImageSize.cs rename to Application/Shared/ImageSize.cs index 17b104f..c6f27d2 100644 --- a/Application/Common/ImageSize.cs +++ b/Application/Shared/ImageSize.cs @@ -1,4 +1,4 @@ -namespace Musify.Application.Common +namespace Musify.Application.Shared { public record ImageSize( string SavePath, diff --git a/Application/Tracks/Handlers/CreateTrackCommandHandler.cs b/Application/Tracks/Handlers/CreateTrackCommandHandler.cs index b33ce1a..04f4569 100644 --- a/Application/Tracks/Handlers/CreateTrackCommandHandler.cs +++ b/Application/Tracks/Handlers/CreateTrackCommandHandler.cs @@ -3,7 +3,7 @@ using Mediator; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Musify.Application.Configuration; -using Musify.Application.Common; +using Musify.Application.Shared; using Musify.Application.Events; using Musify.Application.Tracks.Commands; using Musify.Application.Tracks.Responses; diff --git a/Infrastructure/MassTransit/Arguments/PublishPlayListPictureProcessingEventArguments.cs b/Infrastructure/MassTransit/Arguments/PublishPlayListPictureProcessingEventArguments.cs index d3d6689..ce28509 100644 --- a/Infrastructure/MassTransit/Arguments/PublishPlayListPictureProcessingEventArguments.cs +++ b/Infrastructure/MassTransit/Arguments/PublishPlayListPictureProcessingEventArguments.cs @@ -1,4 +1,4 @@ -using Musify.Application.Common; +using Musify.Application.Shared; using Musify.Application.Events; namespace Musify.Infrastructure.MassTransit.Arguments diff --git a/Infrastructure/MassTransit/Arguments/PublishTrackProcessingEventsArguments.cs b/Infrastructure/MassTransit/Arguments/PublishTrackProcessingEventsArguments.cs index 6d4926f..1d10795 100644 --- a/Infrastructure/MassTransit/Arguments/PublishTrackProcessingEventsArguments.cs +++ b/Infrastructure/MassTransit/Arguments/PublishTrackProcessingEventsArguments.cs @@ -1,4 +1,4 @@ -using Musify.Application.Common; +using Musify.Application.Shared; using Musify.Application.Events; namespace Musify.Infrastructure.MassTransit.Arguments diff --git a/Infrastructure/MassTransit/RoutingSlip/Builders/PictureWorkflowRoutingSlipBuilder.cs b/Infrastructure/MassTransit/RoutingSlip/Builders/PictureWorkflowRoutingSlipBuilder.cs index 712298e..0fcbf34 100644 --- a/Infrastructure/MassTransit/RoutingSlip/Builders/PictureWorkflowRoutingSlipBuilder.cs +++ b/Infrastructure/MassTransit/RoutingSlip/Builders/PictureWorkflowRoutingSlipBuilder.cs @@ -1,6 +1,6 @@ using MassTransit; using MassTransit.Courier.Contracts; -using Musify.Application.Common; +using Musify.Application.Shared; using Musify.Application.Events; using Musify.Infrastructure.Configuration; using Musify.Infrastructure.MassTransit.Activities; diff --git a/Infrastructure/MassTransit/RoutingSlip/Builders/PlayListPictureSourceRoutingSlipBuilder.cs b/Infrastructure/MassTransit/RoutingSlip/Builders/PlayListPictureSourceRoutingSlipBuilder.cs index 7e186c9..f863910 100644 --- a/Infrastructure/MassTransit/RoutingSlip/Builders/PlayListPictureSourceRoutingSlipBuilder.cs +++ b/Infrastructure/MassTransit/RoutingSlip/Builders/PlayListPictureSourceRoutingSlipBuilder.cs @@ -1,6 +1,6 @@ using MassTransit; using MassTransit.Courier.Contracts; -using Musify.Application.Common; +using Musify.Application.Shared; using Musify.Application.Events; using Musify.Infrastructure.MassTransit.Activities.Files; using Musify.Infrastructure.MassTransit.Activities.PlayLists; diff --git a/Infrastructure/Services/StorageService.cs b/Infrastructure/Services/StorageService.cs index 3ea9804..76bbb5e 100644 --- a/Infrastructure/Services/StorageService.cs +++ b/Infrastructure/Services/StorageService.cs @@ -228,7 +228,7 @@ namespace Musify.Infrastructure.Services } } - public async IAsyncEnumerable<(string Key, DateTime LastModifiedUtc)> ListObjectsAsync( + public async IAsyncEnumerable ListObjectsAsync( string bucket, string prefix, [System.Runtime.CompilerServices.EnumeratorCancellation] CancellationToken cancellationToken) { var listRequest = new ListObjectsV2Request @@ -242,7 +242,7 @@ namespace Musify.Infrastructure.Services { listResponse = await amazonS3.ListObjectsV2Async(listRequest, cancellationToken); foreach (var obj in listResponse.S3Objects) - yield return (obj.Key, (obj.LastModified ?? DateTime.UtcNow).ToUniversalTime()); + yield return new StorageObject(obj.Key, (obj.LastModified ?? DateTime.UtcNow).ToUniversalTime()); listRequest.ContinuationToken = listResponse.NextContinuationToken; }