Fix: download progress indicator jumping back and forth
This commit is contained in:
@@ -21,7 +21,6 @@ package com.sheepit.client;
|
||||
|
||||
import com.sheepit.client.Configuration.ComputeType;
|
||||
import com.sheepit.client.Error.Type;
|
||||
import com.sheepit.client.datamodel.Chunk;
|
||||
import com.sheepit.client.os.OS;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
@@ -63,9 +62,8 @@ import java.util.regex.Pattern;
|
||||
public static final int SHOW_BASE_ICON = -1;
|
||||
|
||||
private String frameNumber;
|
||||
private List<Chunk> archiveChunks;
|
||||
private String rendererMD5;
|
||||
private List<Chunk> rendererChunks;
|
||||
private DownloadItem projectDownload;
|
||||
private DownloadItem rendererDownload;
|
||||
private String id;
|
||||
private String outputImagePath;
|
||||
|
||||
@@ -93,7 +91,7 @@ import java.util.regex.Pattern;
|
||||
private Log log;
|
||||
|
||||
public Job(Configuration config_, Gui gui_, Log log_, String id_, String frame_, String path_, boolean use_gpu, String command_, String validationUrl_,
|
||||
String script_, List<Chunk> archiveChunks_, String rendererMd5_, List<Chunk> rendererChunks_, String name_, char[] password_, boolean synchronous_upload_,
|
||||
String script_, DownloadItem projectDownload_, DownloadItem rendererDownload_, String name_, char[] password_, boolean synchronous_upload_,
|
||||
String update_method_) {
|
||||
configuration = config_;
|
||||
id = id_;
|
||||
@@ -102,9 +100,8 @@ import java.util.regex.Pattern;
|
||||
useGPU = use_gpu;
|
||||
rendererCommand = command_;
|
||||
validationUrl = validationUrl_;
|
||||
archiveChunks = archiveChunks_;
|
||||
rendererMD5 = rendererMd5_;
|
||||
rendererChunks = rendererChunks_;
|
||||
projectDownload = projectDownload_;
|
||||
rendererDownload = rendererDownload_;
|
||||
name = name_;
|
||||
password = password_.clone();
|
||||
synchronousUpload = synchronous_upload_;
|
||||
@@ -150,7 +147,7 @@ import java.util.regex.Pattern;
|
||||
public String toString() {
|
||||
return String
|
||||
.format("Job (numFrame '%s' archiveChunks %s rendererMD5 '%s' ID '%s' pictureFilename '%s' jobPath '%s' gpu %s name '%s' updateRenderingStatusMethod '%s' render %s)",
|
||||
frameNumber, archiveChunks, rendererMD5, id, outputImagePath, path, useGPU, name, updateRenderingStatusMethod, render);
|
||||
frameNumber, projectDownload.getMD5(), rendererDownload.getMD5(), id, outputImagePath, path, useGPU, name, updateRenderingStatusMethod, render);
|
||||
}
|
||||
|
||||
public String getPrefixOutputImage() {
|
||||
@@ -158,7 +155,7 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
|
||||
public String getRendererDirectory() {
|
||||
return configuration.getWorkingDirectory().getAbsolutePath() + File.separator + rendererMD5;
|
||||
return configuration.getWorkingDirectory().getAbsolutePath() + File.separator + rendererDownload.getMD5();
|
||||
}
|
||||
|
||||
public String getRendererPath() {
|
||||
|
||||
Reference in New Issue
Block a user