Fix: better ui for displaying progress of project download

This commit is contained in:
Sheepit Renderfarm
2023-09-21 07:52:11 +00:00
parent b8e5b805af
commit 18928a11e7
4 changed files with 10 additions and 6 deletions

View File

@@ -861,8 +861,11 @@ import okhttp3.HttpUrl;
}
protected Error.Type downloadSceneFile(Job ajob_) throws SheepItException {
for (Chunk chunk : ajob_.getArchiveChunks()) {
Error.Type ret = this.downloadFile(ajob_, ajob_.getRequiredProjectChunkPath(chunk.getId()), chunk.getMd5(), String.format(LOCALE, "%s?chunk=%s", this.server.getPage("download-chunk"), chunk.getId()), "project");
int total = ajob_.getArchiveChunks().size();
for (int i = 0; i < total; i++) {
Chunk chunk = ajob_.getArchiveChunks().get(i);
Error.Type ret = this.downloadFile(ajob_, ajob_.getRequiredProjectChunkPath(chunk.getId()), chunk.getMd5(), String.format(LOCALE, "%s?chunk=%s", this.server.getPage("download-chunk"), chunk.getId()), String.format(LOCALE, "chunk %d/%d", i, total));
if (ret != Type.OK) {
return ret;
}