This commit is contained in:
tonikelope 2016-10-10 14:01:45 +02:00
parent efbbaad531
commit 602c369868
4 changed files with 19 additions and 6 deletions

View File

@ -16,8 +16,8 @@ import static megabasterd.MiscTools.getWaitTimeExpBackOff;
*/
public class ChunkDownloaderMono extends ChunkDownloader {
public ChunkDownloaderMono(int id, Download download) {
super(id, download);
public ChunkDownloaderMono(Download download) {
super(1, download);
}
@Override

View File

@ -28,8 +28,8 @@ import static megabasterd.MiscTools.getWaitTimeExpBackOff;
*/
public class ChunkUploaderMono extends ChunkUploader {
public ChunkUploaderMono(int id, Upload upload) {
super(id, upload);
public ChunkUploaderMono(Upload upload) {
super(1, upload);
}
@Override

View File

@ -448,13 +448,21 @@ public final class Download implements Transference, Runnable, SecureNotifiable
swingReflectionInvoke("setVisible", getView().getSlots_spinner(), true);
swingReflectionInvoke("setVisible", getView().getSlot_status_label(), true);
} else {
ChunkDownloaderMono c = new ChunkDownloaderMono(1, this);
ChunkDownloaderMono c = new ChunkDownloaderMono(this);
_chunkworkers.add(c);
_thread_pool.execute(c);
swingReflectionInvoke("setVisible", getView().getSlots_label(), false);
swingReflectionInvoke("setVisible", getView().getSlots_spinner(), false);
swingReflectionInvoke("setVisible", getView().getSlot_status_label(), false);
}
getView().printStatusNormal("Downloading file from mega ...");

View File

@ -660,9 +660,12 @@ public final class Upload implements Transference, Runnable, SecureNotifiable {
swingReflectionInvoke("setVisible", getView().getSlots_spinner(), true);
swingReflectionInvoke("setVisible", getView().getSlot_status_label(), true);
} else {
ChunkUploaderMono c = new ChunkUploaderMono(1, this);
ChunkUploaderMono c = new ChunkUploaderMono(this);
_chunkworkers.add(c);
@ -671,6 +674,8 @@ public final class Upload implements Transference, Runnable, SecureNotifiable {
swingReflectionInvoke("setVisible", getView().getSlots_label(), false);
swingReflectionInvoke("setVisible", getView().getSlots_spinner(), false);
swingReflectionInvoke("setVisible", getView().getSlot_status_label(), false);
}
printStatus("Uploading file to mega ("+_ma.getEmail()+") ...");