sorting local images before uploading them
All checks were successful
PiwigoDirectorySync/pipeline/head This commit looks good
All checks were successful
PiwigoDirectorySync/pipeline/head This commit looks good
This commit is contained in:
parent
f39b2ae3fe
commit
783528b8b3
@ -184,6 +184,7 @@ internal class ImageSynchronizer : IImageSynchronizer
|
|||||||
{
|
{
|
||||||
var imagesToUpload = await _persistenceContext.PiwigoImages.Include(i => i.Album)
|
var imagesToUpload = await _persistenceContext.PiwigoImages.Include(i => i.Album)
|
||||||
.Where(i => i.ServerImageId != null && i.Album.ServerId == piwigoServer.Id && i.UploadRequired && i.ServerImageId != null)
|
.Where(i => i.ServerImageId != null && i.Album.ServerId == piwigoServer.Id && i.UploadRequired && i.ServerImageId != null)
|
||||||
|
.OrderBy(i => i.FilePath)
|
||||||
.ToListAsync(ct);
|
.ToListAsync(ct);
|
||||||
|
|
||||||
_logger.Information("Updating {Count} images", imagesToUpload.Count);
|
_logger.Information("Updating {Count} images", imagesToUpload.Count);
|
||||||
@ -208,6 +209,7 @@ internal class ImageSynchronizer : IImageSynchronizer
|
|||||||
{
|
{
|
||||||
var imagesToUpload = await _persistenceContext.PiwigoImages.Include(i => i.Album)
|
var imagesToUpload = await _persistenceContext.PiwigoImages.Include(i => i.Album)
|
||||||
.Where(i => i.ServerImageId == null && i.Album.ServerId == piwigoServer.Id && i.Album.ServerAlbumId != null)
|
.Where(i => i.ServerImageId == null && i.Album.ServerId == piwigoServer.Id && i.Album.ServerAlbumId != null)
|
||||||
|
.OrderBy(i => i.FilePath)
|
||||||
.ToListAsync(ct);
|
.ToListAsync(ct);
|
||||||
|
|
||||||
_logger.Information("Uploading {Count} images", imagesToUpload.Count);
|
_logger.Information("Uploading {Count} images", imagesToUpload.Count);
|
||||||
@ -245,6 +247,7 @@ internal class ImageSynchronizer : IImageSynchronizer
|
|||||||
{
|
{
|
||||||
var imagesToSearch = await _persistenceContext.PiwigoImages.Include(i => i.Album)
|
var imagesToSearch = 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)
|
||||||
|
.OrderBy(i => i.FilePath)
|
||||||
.ToListAsync(ct);
|
.ToListAsync(ct);
|
||||||
|
|
||||||
_logger.Information("Checking {Count} images if they exist", imagesToSearch.Count);
|
_logger.Information("Checking {Count} images if they exist", imagesToSearch.Count);
|
||||||
|
Loading…
Reference in New Issue
Block a user