From 3806e007dd44bce43dc22a4542c81391b140b6d0 Mon Sep 17 00:00:00 2001 From: genuineparts Date: Fri, 17 Mar 2017 23:38:36 +0100 Subject: [PATCH] Fixing Issue #47 --- .../java/at/becast/youploader/youtube/upload/UploadManager.java | 1 + .../java/at/becast/youploader/youtube/upload/UploadWorker.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/becast/youploader/youtube/upload/UploadManager.java b/src/main/java/at/becast/youploader/youtube/upload/UploadManager.java index 0b81565..c056566 100644 --- a/src/main/java/at/becast/youploader/youtube/upload/UploadManager.java +++ b/src/main/java/at/becast/youploader/youtube/upload/UploadManager.java @@ -224,6 +224,7 @@ public void startNextUpload(){ Date start = _ToUpload.get(s).startAt; if((start!=null && start.compareTo(new Date())<=0) || start==null){ UploadWorker w = _ToUpload.get(s); + w.resetUploader(); w.start(); LOG.info("Upload {} started",w.videodata.snippet.title); _Uploading.add(w); diff --git a/src/main/java/at/becast/youploader/youtube/upload/UploadWorker.java b/src/main/java/at/becast/youploader/youtube/upload/UploadWorker.java index de19f8d..179ac0d 100644 --- a/src/main/java/at/becast/youploader/youtube/upload/UploadWorker.java +++ b/src/main/java/at/becast/youploader/youtube/upload/UploadWorker.java @@ -81,6 +81,7 @@ public UploadWorker(int id, File file, Video videodata, int speed_limit, VideoMe } public void prepare(){ + try { this.upload = this.uploader.prepareUpload(this.file, this.videodata); } catch (IOException s){ @@ -156,7 +157,6 @@ public void resetUploader(){ this.uploader = new Uploader(this.AccMgr.getAuth(acc_id)); } - public void abort(){ this.uploader.abort(); }