mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-05-28 20:40:13 +02:00
4.10
This commit is contained in:
parent
84021561d0
commit
95dcf5d65b
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.tonikelope</groupId>
|
||||
<artifactId>MegaBasterd</artifactId>
|
||||
<version>4.9</version>
|
||||
<version>4.10</version>
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -76,7 +76,7 @@
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/images/icons8-add-file-30.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Select files"/>
|
||||
<Property name="text" type="java.lang.String" value="Select (any) file part"/>
|
||||
<Property name="doubleBuffered" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
|
@ -125,7 +125,7 @@ public class FileMergerDialog extends javax.swing.JDialog {
|
||||
|
||||
file_button.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
||||
file_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icons8-add-file-30.png"))); // NOI18N
|
||||
file_button.setText("Select files");
|
||||
file_button.setText("Select (any) file part");
|
||||
file_button.setDoubleBuffered(true);
|
||||
file_button.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@ -272,7 +272,7 @@ public class FileMergerDialog extends javax.swing.JDialog {
|
||||
|
||||
}
|
||||
|
||||
this.file_button.setText("Select file");
|
||||
this.file_button.setText("Select (any) file part");
|
||||
|
||||
this.file_button.setEnabled(true);
|
||||
|
||||
|
@ -46,7 +46,7 @@ import static java.awt.event.WindowEvent.WINDOW_CLOSING;
|
||||
*/
|
||||
public final class MainPanel {
|
||||
|
||||
public static final String VERSION = "4.9";
|
||||
public static final String VERSION = "4.10";
|
||||
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
||||
public static final int STREAMER_PORT = 1337;
|
||||
|
@ -871,7 +871,7 @@ public final class MiscTools {
|
||||
|
||||
public static String checkNewVersion(String folder_node, String folder_key) {
|
||||
|
||||
String new_version = null;
|
||||
String new_version_major = null, new_version_minor = null, current_version_major = null, current_version_minor = null;
|
||||
|
||||
try {
|
||||
MegaAPI ma = new MegaAPI();
|
||||
@ -884,24 +884,28 @@ public final class MiscTools {
|
||||
|
||||
HashMap<String, Object> current_node = (HashMap<String, Object>) o;
|
||||
|
||||
new_version = findFirstRegex("([0-9\\.]+)\\.run", (String) current_node.get("name"), 1);
|
||||
new_version_major = findFirstRegex("([0-9]+)\\.[0-9]+\\.run", (String) current_node.get("name"), 1);
|
||||
|
||||
if (new_version != null && Double.parseDouble(new_version) > Double.parseDouble(VERSION)) {
|
||||
new_version_minor = findFirstRegex("[0-9]+\\.([0-9]+)\\.run", (String) current_node.get("name"), 1);
|
||||
|
||||
break;
|
||||
current_version_major = findFirstRegex("([0-9]+)\\.[0-9]+$", VERSION, 1);
|
||||
|
||||
} else {
|
||||
current_version_minor = findFirstRegex("[0-9]+\\.([0-9]+)$", VERSION, 1);
|
||||
|
||||
if (new_version_major != null && (Integer.parseInt(current_version_major) < Integer.parseInt(new_version_major) || (Integer.parseInt(current_version_major) == Integer.parseInt(new_version_major) && Integer.parseInt(current_version_minor) < Integer.parseInt(new_version_minor)))) {
|
||||
|
||||
return new_version_major + "." + new_version_minor;
|
||||
|
||||
new_version = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(MiscTools.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
return new_version;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void openBrowserURL(final String url) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user