From 78878260d35aab6b50a6981ac27427d0021869fa Mon Sep 17 00:00:00 2001 From: randompooper <53050756+randompooper@users.noreply.github.com> Date: Thu, 18 Jul 2019 06:09:01 +0000 Subject: [PATCH 1/3] So long quotes! YTPGenerator no longer requires them and they break compatibility with Linux systems --- src/ytpplusui/FXMLController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ytpplusui/FXMLController.java b/src/ytpplusui/FXMLController.java index 0bb8022..f54f4e9 100644 --- a/src/ytpplusui/FXMLController.java +++ b/src/ytpplusui/FXMLController.java @@ -199,9 +199,9 @@ public void run() { System.out.println("poop"); YTPGenerator generator = new YTPGenerator(TEMP + "tempoutput.mp4"); System.out.println("poop2"); - generator.toolBox.FFMPEG = "\"" + tfFFMPEG.getText() + "\""; - generator.toolBox.FFPROBE = "\"" + tfFFPROBE.getText() + "\""; - generator.toolBox.MAGICK = "\"" + tfMAGICK.getText() + "\""; + generator.toolBox.FFMPEG = tfFFMPEG.getText(); + generator.toolBox.FFPROBE = tfFFPROBE.getText(); + generator.toolBox.MAGICK = tfMAGICK.getText(); System.out.println("poop3"); String jobDir = tfTEMP.getText() + "job_" + System.currentTimeMillis() + "/"; generator.toolBox.TEMP = jobDir; @@ -227,7 +227,7 @@ public void run() { System.out.println("poop5"); for (String source : sourceList) { - generator.addSource("\"" + source + "\""); + generator.addSource(source); } System.out.println("poop6"); int maxclips = Integer.parseInt(tfClipCount.getText()); From 48e85ecbfae6f5c61ef9dcad98063033ac194d4c Mon Sep 17 00:00:00 2001 From: randompooper <53050756+randompooper@users.noreply.github.com> Date: Thu, 18 Jul 2019 06:13:24 +0000 Subject: [PATCH 2/3] Add sleep between progress checks This reduces system load by making checks for progress a lot less frequent TO DO: Add callbacks to YTPGenerator class and let it update progress --- src/ytpplusui/FXMLController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ytpplusui/FXMLController.java b/src/ytpplusui/FXMLController.java index f54f4e9..91f13c2 100644 --- a/src/ytpplusui/FXMLController.java +++ b/src/ytpplusui/FXMLController.java @@ -244,7 +244,11 @@ public void run() { System.out.println("poop8"); while (!generator.done) { barProgress.setProgress(generator.doneCount); - + try { + Thread.sleep(10); + } catch (InterruptedException ex) { + // Keep going + } // System.out.println((elapsedTime * generator.doneCount ) - elapsedTime); } barProgress.setProgress(1); From ca697c66bf12214cb0637df0aadf4e8813b79020 Mon Sep 17 00:00:00 2001 From: randompooper <53050756+randompooper@users.noreply.github.com> Date: Thu, 18 Jul 2019 06:23:26 +0000 Subject: [PATCH 3/3] Also update LAST_BROWSED after choosing sources --- src/ytpplusui/FXMLController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ytpplusui/FXMLController.java b/src/ytpplusui/FXMLController.java index 91f13c2..17ad639 100644 --- a/src/ytpplusui/FXMLController.java +++ b/src/ytpplusui/FXMLController.java @@ -182,7 +182,7 @@ void addSource(ActionEvent event) { sourceList.add(file.getAbsolutePath().replace('\\', '/')); } listviewSourcesList.setItems(sourceList); - + LAST_BROWSED = selected.get(0).getParentFile(); } @FXML