only update images where the album is synchronized with the server
This commit is contained in:
parent
3d3cde63dd
commit
6f0e5e06a9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user