Ref: move directories handle to a specific class (outside of Client class)

This commit is contained in:
Sheepit Renderfarm
2023-12-19 14:35:24 +00:00
parent b4d7ee5edb
commit 3e850ad6e5
3 changed files with 123 additions and 63 deletions

View File

@@ -147,32 +147,10 @@ import java.util.regex.Pattern;
return configuration.getWorkingDirectory().getAbsolutePath() + File.separator + rendererMD5;
}
public String getRequiredRendererArchivePath() {
if (configuration.getSharedDownloadsDirectory() != null) {
return configuration.getSharedDownloadsDirectory().getAbsolutePath() + File.separator + rendererMD5 + ".zip";
}
else {
return getRendererArchivePath();
}
}
public String getRendererPath() {
return getRendererDirectory() + File.separator + OS.getOS().getRenderBinaryPath();
}
public String getRendererArchivePath() {
return configuration.getStorageDir().getAbsolutePath() + File.separator + rendererMD5 + ".zip";
}
public String getRequiredProjectChunkPath(String chunk) {
if (configuration.getSharedDownloadsDirectory() != null) {
return configuration.getSharedDownloadsDirectory().getAbsolutePath() + File.separator + chunk + ".wool";
}
else {
return getSceneArchiveChunkPath(chunk);
}
}
public String getSceneDirectory() {
return configuration.getWorkingDirectory().getAbsolutePath() + File.separator + this.id;
}
@@ -181,10 +159,6 @@ import java.util.regex.Pattern;
return getSceneDirectory() + File.separator + this.path;
}
public String getSceneArchiveChunkPath(String chunk) {
return configuration.getWorkingDirectory().getAbsolutePath() + File.separator + chunk + ".wool";
}
public Error.Type render(Observer renderStarted) {
gui.status("Rendering");
RenderProcess process = getProcessRender();