1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 07:01:59 +00:00

fix(cli): uploadCounters increase only when files are uploaded (#6357)

* uploadcounters increase only when files are uploaded

* move up totalSizeUploaded counter
This commit is contained in:
Bohan Zhang 2024-01-18 14:15:13 +11:00 committed by GitHub
parent d4146e3e6d
commit b98d1bf9d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,6 +107,8 @@ export class Upload extends BaseCommand {
const formData = asset.getUploadFormData();
const res = await this.uploadAsset(formData);
existingAssetId = res.data.id;
uploadCounter++;
totalSizeUploaded += asset.fileSize;
}
if ((options.album || options.albumName) && asset.albumName !== undefined) {
@ -127,9 +129,6 @@ export class Upload extends BaseCommand {
}
}
}
totalSizeUploaded += asset.fileSize;
uploadCounter++;
}
sizeSoFar += asset.fileSize;