From 6f0e5e06a97eb0041e55d81496c01719c5ea8fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=A4felfinger?= Date: Mon, 11 Sep 2023 16:28:20 +0200 Subject: [PATCH] only update images where the album is synchronized with the server --- PiwigoDirectorySync/Services/ImageSynchronizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PiwigoDirectorySync/Services/ImageSynchronizer.cs b/PiwigoDirectorySync/Services/ImageSynchronizer.cs index 09e03c6..736b5b0 100644 --- a/PiwigoDirectorySync/Services/ImageSynchronizer.cs +++ b/PiwigoDirectorySync/Services/ImageSynchronizer.cs @@ -165,7 +165,7 @@ internal class ImageSynchronizer : IImageSynchronizer private async Task UploadNewImagesToServerAsync(IPiwigoClient piwigoClient, ServerEntity piwigoServer, CancellationToken ct) { var imagesToUpload = await _persistenceContext.PiwigoImages.Include(i => i.Album) - .Where(i => i.ServerImageId == null && i.Album.ServerId == piwigoServer.Id) + .Where(i => i.ServerImageId == null && i.Album.ServerId == piwigoServer.Id && i.Album.ServerAlbumId != null) .ToListAsync(ct); _logger.LogInformation("Uploading {Count} images", imagesToUpload.Count);