Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

Commit

Permalink
Version
Browse files Browse the repository at this point in the history
  • Loading branch information
becast committed Jan 18, 2017
1 parent c6b390a commit affe78e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,20 @@ public void restart(int upload_id) {
for(int i=0;i<_Uploading.size();i++){
if(_Uploading.get(i).id == upload_id){
UploadWorker o = _Uploading.get(i);
_Uploading.remove(i);
try {
o.join();
} catch (InterruptedException e1) {
LOG.error("Upload worker thread timeout was interrupted", e1);
}
if(o.retrys<5){
try {
for(int s = 10; s>0;s--){
o.frame.getProgressBar().setString(String.format(LANG.getString("Upload.Error"), s));
Thread.sleep(1000);
}
} catch (InterruptedException e) {
LOG.error("Upload worker thread timeout was interrupted", e);
for(int s = 10; s>0;s--){
o.frame.getProgressBar().setString(String.format(LANG.getString("Upload.Error"), s));
}

LOG.info("Restarting Upload {}",o.videodata.snippet.title);
UploadWorker worker = new UploadWorker(upload_id, o.file, o.videodata, this.getSpeed_limit(), o.metadata, o.upload.url, o.upload.id, o.startAt);
worker.setRetrys(o.getRetrys());
_Uploading.set(i, worker);
_Uploading.addFirst(worker);
worker.start();
}else{
o.frame.getProgressBar().setString(LANG.getString("Upload.Failed"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ public void setPlaylists(String playlist, Upload upload) throws IOException, Upl

public void abort() {
try {
this.http.setAborted(true);
this.stream.abort();
this.http.abort();
this.stream.close();
this.http.close();
} catch (Exception e) {

}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.1-beta
0.9.2-beta

0 comments on commit affe78e

Please sign in to comment.