diff --git a/OneShelf.Videos/OneShelf.Videos.App/Program.cs b/OneShelf.Videos/OneShelf.Videos.App/Program.cs index 0ec3c289..c234b048 100644 --- a/OneShelf.Videos/OneShelf.Videos.App/Program.cs +++ b/OneShelf.Videos/OneShelf.Videos.App/Program.cs @@ -15,7 +15,7 @@ var service1 = host.Services.GetRequiredService(); var service2 = host.Services.GetRequiredService(); -var service3 = host.Services.GetRequiredService(); +var service3 = host.Services.GetRequiredService(); var service4 = host.Services.GetRequiredService(); await using var videosDatabase = host.Services.GetRequiredService(); diff --git a/OneShelf.Videos/OneShelf.Videos.BusinessLogic/ServiceCollectionExtensions.cs b/OneShelf.Videos/OneShelf.Videos.BusinessLogic/ServiceCollectionExtensions.cs index 7053024f..8d38262c 100644 --- a/OneShelf.Videos/OneShelf.Videos.BusinessLogic/ServiceCollectionExtensions.cs +++ b/OneShelf.Videos/OneShelf.Videos.BusinessLogic/ServiceCollectionExtensions.cs @@ -20,7 +20,7 @@ public static IServiceCollection AddVideosBusinessLogic(this IServiceCollection .Configure(o => configuration.GetSection(nameof(VideosOptions)).Bind(o)) .AddScoped() .AddScoped() - .AddScoped() + .AddScoped() .AddScoped() .AddSingleton() .AddScoped() diff --git a/OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/Service3.cs b/OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/ExifService.cs similarity index 97% rename from OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/Service3.cs rename to OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/ExifService.cs index dbbcd5e7..0bdd3ab5 100644 --- a/OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/Service3.cs +++ b/OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/ExifService.cs @@ -4,7 +4,7 @@ namespace OneShelf.Videos.BusinessLogic.Services; -public class Service3 +public class ExifService { public async Task SetExifTimestamp(string path, string tempFileName) { diff --git a/OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/Service2.cs b/OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/Service2.cs index 50a07a35..18312819 100644 --- a/OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/Service2.cs +++ b/OneShelf.Videos/OneShelf.Videos.BusinessLogic/Services/Service2.cs @@ -13,14 +13,14 @@ public class Service2 private readonly ILogger _logger; private readonly VideosDatabase _videosDatabase; private readonly VideosDatabaseOperations _videosDatabaseOperations; - private readonly Service3 _service3; + private readonly ExifService _exifService; - public Service2(ExtendedGooglePhotosService extendedGooglePhotosService, ILogger logger, VideosDatabase videosDatabase, Service3 service3, VideosDatabaseOperations videosDatabaseOperations) + public Service2(ExtendedGooglePhotosService extendedGooglePhotosService, ILogger logger, VideosDatabase videosDatabase, ExifService exifService, VideosDatabaseOperations videosDatabaseOperations) { _extendedGooglePhotosService = extendedGooglePhotosService; _logger = logger; _videosDatabase = videosDatabase; - _service3 = service3; + _exifService = exifService; _videosDatabaseOperations = videosDatabaseOperations; } @@ -89,7 +89,7 @@ public async Task UploadPhotos(List<(long chatId, int messageId, string path, Da Directory.CreateDirectory(tempDirectory); var tempFileName = Path.Combine(Path.GetTempPath(), i.ToString(), Path.GetFileName(itemsByKey[x].path)); - var timestampFromFile = await _service3.SetExifTimestamp(itemsByKey[x].path, tempFileName); + var timestampFromFile = await _exifService.SetExifTimestamp(itemsByKey[x].path, tempFileName); lock (fileNameTimestamps) { fileNameTimestamps[x] = timestampFromFile;