Skip to content

Commit

Permalink
2.42
Browse files Browse the repository at this point in the history
  • Loading branch information
tonikelope committed Nov 30, 2017
1 parent 318280e commit 05efe13
Show file tree
Hide file tree
Showing 12 changed files with 172 additions and 146 deletions.
1 change: 0 additions & 1 deletion .9550831e70d432ce4986a2d152110e9d23f2dbca

This file was deleted.

35 changes: 17 additions & 18 deletions src/megabasterd/AboutDialog.form
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="subtitle_label" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="mcdown_url_button" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="check_version_button" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="made_in_spain_label" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
Expand All @@ -54,7 +43,16 @@
</Group>
</Group>
</Group>
<Component id="title_label" pref="546" max="32767" attributes="0"/>
<Component id="title_label" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Component id="subtitle_label" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="mcdown_url_button" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="check_version_button" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
Expand All @@ -68,10 +66,11 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="subtitle_label" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="mcdown_url_button" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="check_version_button" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="mcdown_url_button" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="check_version_button" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="made_in_spain_label" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="1" attributes="0">
Expand Down Expand Up @@ -126,7 +125,7 @@
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="66" green="66" red="66" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" value="(Made with love by tonikelope)"/>
<Property name="text" type="java.lang.String" value="Made with love (and with no warranty) by tonikelope."/>
<Property name="doubleBuffered" type="boolean" value="true"/>
</Properties>
</Component>
Expand All @@ -147,7 +146,7 @@
<Component class="javax.swing.JButton" name="mcdown_url_button">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="18" style="1"/>
<Font name="Dialog" size="14" style="1"/>
</Property>
<Property name="text" type="java.lang.String" value="Copy MegaBasterd download URL"/>
<Property name="doubleBuffered" type="boolean" value="true"/>
Expand Down
27 changes: 13 additions & 14 deletions src/megabasterd/AboutDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void mouseReleased(java.awt.event.MouseEvent evt) {

subtitle_label.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
subtitle_label.setForeground(new java.awt.Color(102, 102, 102));
subtitle_label.setText("(Made with love by tonikelope)");
subtitle_label.setText("Made with love (and with no warranty) by tonikelope.");
subtitle_label.setDoubleBuffered(true);

mc_logo_label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/megabasterd/mega_crypter.png"))); // NOI18N
Expand All @@ -83,7 +83,7 @@ public void mouseReleased(java.awt.event.MouseEvent evt) {
}
});

mcdown_url_button.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
mcdown_url_button.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
mcdown_url_button.setText("Copy MegaBasterd download URL");
mcdown_url_button.setDoubleBuffered(true);
mcdown_url_button.addActionListener(new java.awt.event.ActionListener() {
Expand Down Expand Up @@ -127,14 +127,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(subtitle_label)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(mcdown_url_button, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(check_version_button, javax.swing.GroupLayout.Alignment.TRAILING)))
.addGroup(layout.createSequentialGroup()
.addComponent(made_in_spain_label)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
Expand All @@ -144,7 +136,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(pica_roja_label)
.addGap(18, 18, 18)
.addComponent(mc_logo_label))))
.addComponent(title_label, javax.swing.GroupLayout.DEFAULT_SIZE, 546, Short.MAX_VALUE))
.addComponent(title_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(subtitle_label)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(mcdown_url_button)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(check_version_button)))
.addContainerGap())
);
layout.setVerticalGroup(
Expand All @@ -155,9 +154,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(subtitle_label)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(mcdown_url_button)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(check_version_button)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(mcdown_url_button)
.addComponent(check_version_button))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(made_in_spain_label)
Expand Down
19 changes: 18 additions & 1 deletion src/megabasterd/ChunkUploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public CloseableHttpResponse call() throws IOException {

if (MegaAPI.checkMEGAError(response) != 0) {

Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} UPLOAD FAILED! (MEGA ERROR: {1})", new Object[]{Thread.currentThread().getName(), MegaAPI.checkMEGAError(response)});
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} UPLOAD FAILED! (MEGA ERROR: {1})", new Object[]{Thread.currentThread().getName(), MegaAPI.checkMEGAError(response)});

error = true;

Expand All @@ -255,8 +255,17 @@ public CloseableHttpResponse call() throws IOException {

if (error && !_upload.isStopped()) {

Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} from worker {2} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk.getId(), _id});

_upload.rejectChunkId(chunk.getId());

if (tot_bytes_up > 0) {

_upload.getPartialProgress().add(-1 * tot_bytes_up);

_upload.getProgress_meter().secureNotify();
}

conta_error++;

if (!_exit) {
Expand Down Expand Up @@ -285,6 +294,8 @@ public CloseableHttpResponse call() throws IOException {

} catch (ExecutionException | InterruptedException | CancellationException exception) {

Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} from worker {2} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk.getId(), _id});

_upload.rejectChunkId(chunk.getId());

if (tot_bytes_up > 0) {
Expand All @@ -294,6 +305,8 @@ public CloseableHttpResponse call() throws IOException {
_upload.getProgress_meter().secureNotify();
}

Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, exception);

} finally {

if (httpresponse != null) {
Expand All @@ -309,6 +322,8 @@ public CloseableHttpResponse call() throws IOException {
_upload.rejectChunkId(chunk.getId());
}
} catch (IOException ex) {
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} from worker {2} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk.getId(), _id});

_upload.rejectChunkId(chunk.getId());

if (tot_bytes_up > 0) {
Expand Down Expand Up @@ -340,7 +355,9 @@ public CloseableHttpResponse call() throws IOException {
_upload.emergencyStopUploader(ex.getMessage());

Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);

} catch (URISyntaxException ex) {

Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
}

Expand Down
14 changes: 12 additions & 2 deletions src/megabasterd/ChunkUploaderMono.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ public CloseableHttpResponse call() throws IOException {

if (error && !getUpload().isStopped()) {

Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk.getId()});

getUpload().rejectChunkId(chunk.getId());

conta_error++;
Expand Down Expand Up @@ -187,6 +189,9 @@ public CloseableHttpResponse call() throws IOException {
}

} catch (IOException ex) {

Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk.getId()});

error = true;

getUpload().rejectChunkId(chunk.getId());
Expand Down Expand Up @@ -255,13 +260,18 @@ public CloseableHttpResponse call() throws IOException {

} catch (ExecutionException | InterruptedException | CancellationException exception) {

Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk.getId()});

error = true;

getUpload().rejectChunkId(chunk.getId());

getUpload().getPartialProgress().add(-1 * tot_bytes_up);
if (tot_bytes_up > 0) {

getUpload().getProgress_meter().secureNotify();
getUpload().getPartialProgress().add(-1 * tot_bytes_up);

getUpload().getProgress_meter().secureNotify();
}

} finally {

Expand Down
4 changes: 3 additions & 1 deletion src/megabasterd/LinkGrabberDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ public void run() {
@Override
public void notifyClipboardChange() {

swingReflectionInvoke("setText", links_textarea, extractMegaLinksFromString(extractStringFromClipboardContents(_clipboardspy.getContents())));
String current_text = (String) swingReflectionInvokeAndWaitForReturn("getText", links_textarea);

swingReflectionInvoke("append", links_textarea, (current_text.length() > 0 ? "\n\n" : "") + extractMegaLinksFromString(extractStringFromClipboardContents(_clipboardspy.getContents())));
}
}
2 changes: 1 addition & 1 deletion src/megabasterd/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*/
public final class MainPanel {

public static final String VERSION = "2.41";
public static final String VERSION = "2.42";
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;
Expand Down
8 changes: 4 additions & 4 deletions src/megabasterd/MainPanelView.form
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="18" style="0"/>
</Property>
<Property name="text" type="java.lang.String" value="Remove all pre/pro/wait downloads"/>
<Property name="text" type="java.lang.String" value="Remove all no running downloads"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clean_all_down_menuActionPerformed"/>
Expand All @@ -64,7 +64,7 @@
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="18" style="0"/>
</Property>
<Property name="text" type="java.lang.String" value="Remove all pre/pro/wait uploads"/>
<Property name="text" type="java.lang.String" value="Remove all no running uploads"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clean_all_up_menuActionPerformed"/>
Expand All @@ -88,7 +88,7 @@
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="18" style="0"/>
</Property>
<Property name="text" type="java.lang.String" value="EXIT"/>
<Property name="text" type="java.lang.String" value="Exit"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="exit_menuActionPerformed"/>
Expand Down Expand Up @@ -184,7 +184,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jTabbedPane1" pref="482" max="32767" attributes="0"/>
<Component id="jTabbedPane1" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="logo_label" min="-2" max="-2" attributes="0"/>
Expand Down
8 changes: 4 additions & 4 deletions src/megabasterd/MainPanelView.java
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
file_menu.add(jSeparator4);

clean_all_down_menu.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
clean_all_down_menu.setText("Remove all pre/pro/wait downloads");
clean_all_down_menu.setText("Remove all no running downloads");
clean_all_down_menu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
clean_all_down_menuActionPerformed(evt);
Expand All @@ -369,7 +369,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
file_menu.add(clean_all_down_menu);

clean_all_up_menu.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
clean_all_up_menu.setText("Remove all pre/pro/wait uploads");
clean_all_up_menu.setText("Remove all no running uploads");
clean_all_up_menu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
clean_all_up_menuActionPerformed(evt);
Expand All @@ -388,7 +388,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
file_menu.add(hide_tray_menu);

exit_menu.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
exit_menu.setText("EXIT");
exit_menu.setText("Exit");
exit_menu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exit_menuActionPerformed(evt);
Expand Down Expand Up @@ -448,7 +448,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)
.addComponent(jTabbedPane1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(logo_label)
Expand Down
Loading

0 comments on commit 05efe13

Please sign in to comment.