fixes pending count
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
662df35f6a
commit
ed43852124
@ -44,7 +44,7 @@ internal class AlbumSynchronizer : IAlbumSynchronizer
|
|||||||
|
|
||||||
public async Task<PendingChange> GetPendingChangesAsync(int piwigoServerId, CancellationToken ct)
|
public async Task<PendingChange> GetPendingChangesAsync(int piwigoServerId, CancellationToken ct)
|
||||||
{
|
{
|
||||||
var getOrAdds = await _persistenceContext.PiwigoAlbums.Where(a => a.ServerAlbumId == null).CountAsync(ct);
|
var getOrAdds = await _persistenceContext.PiwigoAlbums.Where(a => a.ServerAlbumId == null && a.ServerId == piwigoServerId).CountAsync(ct);
|
||||||
const int updates = 0; // not yet supported
|
const int updates = 0; // not yet supported
|
||||||
const int deletes = 0; // not yet supported
|
const int deletes = 0; // not yet supported
|
||||||
|
|
||||||
|
@ -23,9 +23,9 @@ internal class ImageSynchronizer : IImageSynchronizer
|
|||||||
|
|
||||||
public async Task<PendingChange> GetPendingChangesAsync(int piwigoServerId, CancellationToken ct)
|
public async Task<PendingChange> GetPendingChangesAsync(int piwigoServerId, CancellationToken ct)
|
||||||
{
|
{
|
||||||
var getOrAdds = await _persistenceContext.PiwigoImages.Where(i => i.ServerImageId == null).CountAsync(ct);
|
var getOrAdds = await _persistenceContext.PiwigoImages.Where(i => i.Album.ServerId == piwigoServerId && i.ServerImageId == null).CountAsync(ct);
|
||||||
var updates = await _persistenceContext.PiwigoImages.Where(i => i.ServerImageId != null && i.UploadRequired).CountAsync(ct);
|
var updates = await _persistenceContext.PiwigoImages.Where(i => i.Album.ServerId == piwigoServerId && i.ServerImageId != null && i.UploadRequired).CountAsync(ct);
|
||||||
var deletes = await _persistenceContext.PiwigoImages.Where(i => i.ServerImageId != null && i.DeleteRequired).CountAsync(ct);
|
var deletes = await _persistenceContext.PiwigoImages.Where(i => i.Album.ServerId == piwigoServerId && i.ServerImageId != null && i.DeleteRequired).CountAsync(ct);
|
||||||
|
|
||||||
return new PendingChange(getOrAdds, updates, deletes);
|
return new PendingChange(getOrAdds, updates, deletes);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user