diff --git a/src/com/sheepit/client/Client.java b/src/com/sheepit/client/Client.java index 155eeb7..c6e8954 100644 --- a/src/com/sheepit/client/Client.java +++ b/src/com/sheepit/client/Client.java @@ -533,22 +533,24 @@ public class Client { } protected int downloadSceneFile(Job ajob_) { - this.gui.status("Downloading project"); - return this.downloadFile(ajob_, ajob_.getSceneArchivePath(), ajob_.getSceneMD5(), String.format("%s?type=job&job=%s&revision=%s", this.server.getPage("download-archive"), ajob_.getId(), ajob_.getRevision()), "Downloading project %s %%"); + return this.downloadFile(ajob_, ajob_.getSceneArchivePath(), ajob_.getSceneMD5(), String.format("%s?type=job&job=%s&revision=%s", this.server.getPage("download-archive"), ajob_.getId(), ajob_.getRevision()), "project"); } protected int downloadExecutable(Job ajob) { - this.gui.status("Downloading renderer"); - return this.downloadFile(ajob, ajob.getRendererArchivePath(), ajob.getRenderMd5(), String.format("%s?type=binary&job=%s", this.server.getPage("download-archive"), ajob.getId()), "Downloading renderer %s %%"); + return this.downloadFile(ajob, ajob.getRendererArchivePath(), ajob.getRenderMd5(), String.format("%s?type=binary&job=%s", this.server.getPage("download-archive"), ajob.getId()), "renderer"); } - private int downloadFile(Job ajob, String local_path, String md5_server, String url, String update_ui) { + private int downloadFile(Job ajob, String local_path, String md5_server, String url, String download_type) { File local_path_file = new File(local_path); + String update_ui = "Downloading " + download_type + " %s %%"; if (local_path_file.exists() == true) { + this.gui.status("Reusing cached " + download_type); return 0; } + this.gui.status("Downloading " + download_type); + // must download the archive int ret = this.server.HTTPGetFile(url, local_path, this.gui, update_ui); boolean md5_check = this.checkFile(ajob, local_path, md5_server);