diff --git a/README.md b/README.md index fb01ed7..b3cba7f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Link-Manager v1.2.1 +# Link-Manager v1.2.2 This is my first app! It allows you to write, load and save a list of links. With one click you can open them all in your selected browser or simply download images, videos and gifs with one click. It will also allow you to encrypt your list of links with a 256 bit AES encryption. diff --git a/out/artifacts/LinkManager_jar/LinkManager.jar b/out/artifacts/LinkManager_jar/LinkManager.jar index 20f1727..a3f3dd5 100644 Binary files a/out/artifacts/LinkManager_jar/LinkManager.jar and b/out/artifacts/LinkManager_jar/LinkManager.jar differ diff --git a/out/production/LinkManager/app/DownloadManagerDialog.class b/out/production/LinkManager/app/DownloadManagerDialog.class index da1ef29..55c3d49 100644 Binary files a/out/production/LinkManager/app/DownloadManagerDialog.class and b/out/production/LinkManager/app/DownloadManagerDialog.class differ diff --git a/out/production/LinkManager/app/Version.class b/out/production/LinkManager/app/Version.class index 435d6df..6142ff8 100644 Binary files a/out/production/LinkManager/app/Version.class and b/out/production/LinkManager/app/Version.class differ diff --git a/src/app/DownloadManagerDialog.java b/src/app/DownloadManagerDialog.java index fdc33cc..8ab64da 100644 --- a/src/app/DownloadManagerDialog.java +++ b/src/app/DownloadManagerDialog.java @@ -12,7 +12,7 @@ public class DownloadManagerDialog extends JDialog implements Runnable { private DownloadManager manager; - private int interval; + private double interval; private Thread downloadingThread; private JPanel pnlNorth; private JLabel lblTitle; @@ -283,15 +283,15 @@ public DownloadManagerDialog(MainWindow mw, JTextArea taDisplayMW) { btnDownload.addActionListener(e -> { this.manager = new DownloadManager(tfPath.getText()); try { - if ((tfInterval.getText().isBlank() || Integer.parseInt(tfInterval.getText()) < 1) && !isDownloading) { + if ((tfInterval.getText().isBlank() || Double.parseDouble(tfInterval.getText()) <= 0) && !isDownloading) { int yesno = JOptionPane.showConfirmDialog(this, "We would recommend using an interval. The website might detect you as spam. \nDo you want to continue?", "Warning", JOptionPane.YES_NO_OPTION); if (yesno == 1) { return; } - tfInterval.setText("0"); - this.interval = 0; + tfInterval.setText("0.0"); + this.interval = 0.0; } else { - this.interval = Integer.parseInt(tfInterval.getText()); + this.interval = Double.parseDouble(tfInterval.getText()); } } catch (Exception cannotCastToInt) { JOptionPane.showMessageDialog(this, "Your interval input is not a valid number.", "Error", JOptionPane.ERROR_MESSAGE); @@ -469,7 +469,7 @@ public void run() { tableModel.fireTableDataChanged(); current++; tfDownloadStatus.setText(currentStatus + " " + current + "/" + total); - Thread.sleep(interval * 1000L); + Thread.sleep((long) (interval * 1000L)); } int okQuit = JOptionPane.showConfirmDialog(DownloadManagerDialog.this, "Downloading process finished! \nDo you want to Exit the Download Manager?", "Done", JOptionPane.YES_NO_OPTION); if (okQuit == 0) { diff --git a/src/app/Version.java b/src/app/Version.java index fe71643..816fd15 100644 --- a/src/app/Version.java +++ b/src/app/Version.java @@ -3,7 +3,7 @@ public class Version { private static int majorVersion = 1; private static int minorVersion = 2; - private static int patchVersion = 1; + private static int patchVersion = 2; public static String getSoftwareVersion() { return "v" + majorVersion + "." + minorVersion + "." + patchVersion;