Skip to content

Commit 05efe13

Browse files
author
tonikelope
committed
2.42
1 parent 318280e commit 05efe13

12 files changed

+172
-146
lines changed

.9550831e70d432ce4986a2d152110e9d23f2dbca

-1
This file was deleted.

src/megabasterd/AboutDialog.form

+17-18
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,6 @@
3131
<Group type="102" attributes="0">
3232
<EmptySpace max="-2" attributes="0"/>
3333
<Group type="103" groupAlignment="0" attributes="0">
34-
<Group type="102" alignment="1" attributes="0">
35-
<Component id="subtitle_label" min="-2" max="-2" attributes="0"/>
36-
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
37-
</Group>
38-
<Group type="102" alignment="1" attributes="0">
39-
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
40-
<Group type="103" groupAlignment="0" attributes="0">
41-
<Component id="mcdown_url_button" alignment="1" min="-2" max="-2" attributes="0"/>
42-
<Component id="check_version_button" alignment="1" min="-2" max="-2" attributes="0"/>
43-
</Group>
44-
</Group>
4534
<Group type="102" alignment="0" attributes="0">
4635
<Component id="made_in_spain_label" min="-2" max="-2" attributes="0"/>
4736
<EmptySpace max="32767" attributes="0"/>
@@ -54,7 +43,16 @@
5443
</Group>
5544
</Group>
5645
</Group>
57-
<Component id="title_label" pref="546" max="32767" attributes="0"/>
46+
<Component id="title_label" max="32767" attributes="0"/>
47+
<Group type="102" attributes="0">
48+
<Component id="subtitle_label" min="-2" max="-2" attributes="0"/>
49+
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
50+
</Group>
51+
<Group type="102" alignment="0" attributes="0">
52+
<Component id="mcdown_url_button" min="-2" max="-2" attributes="0"/>
53+
<EmptySpace max="32767" attributes="0"/>
54+
<Component id="check_version_button" min="-2" max="-2" attributes="0"/>
55+
</Group>
5856
</Group>
5957
<EmptySpace max="-2" attributes="0"/>
6058
</Group>
@@ -68,10 +66,11 @@
6866
<EmptySpace max="-2" attributes="0"/>
6967
<Component id="subtitle_label" min="-2" max="-2" attributes="0"/>
7068
<EmptySpace type="unrelated" max="-2" attributes="0"/>
71-
<Component id="mcdown_url_button" min="-2" max="-2" attributes="0"/>
72-
<EmptySpace max="-2" attributes="0"/>
73-
<Component id="check_version_button" min="-2" max="-2" attributes="0"/>
74-
<EmptySpace max="-2" attributes="0"/>
69+
<Group type="103" groupAlignment="3" attributes="0">
70+
<Component id="mcdown_url_button" alignment="3" min="-2" max="-2" attributes="0"/>
71+
<Component id="check_version_button" alignment="3" min="-2" max="-2" attributes="0"/>
72+
</Group>
73+
<EmptySpace min="-2" max="-2" attributes="0"/>
7574
<Group type="103" groupAlignment="1" attributes="0">
7675
<Component id="made_in_spain_label" min="-2" max="-2" attributes="0"/>
7776
<Group type="102" alignment="1" attributes="0">
@@ -126,7 +125,7 @@
126125
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
127126
<Color blue="66" green="66" red="66" type="rgb"/>
128127
</Property>
129-
<Property name="text" type="java.lang.String" value="(Made with love by tonikelope)"/>
128+
<Property name="text" type="java.lang.String" value="Made with love (and with no warranty) by tonikelope."/>
130129
<Property name="doubleBuffered" type="boolean" value="true"/>
131130
</Properties>
132131
</Component>
@@ -147,7 +146,7 @@
147146
<Component class="javax.swing.JButton" name="mcdown_url_button">
148147
<Properties>
149148
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
150-
<Font name="Dialog" size="18" style="1"/>
149+
<Font name="Dialog" size="14" style="1"/>
151150
</Property>
152151
<Property name="text" type="java.lang.String" value="Copy MegaBasterd download URL"/>
153152
<Property name="doubleBuffered" type="boolean" value="true"/>

src/megabasterd/AboutDialog.java

+13-14
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void mouseReleased(java.awt.event.MouseEvent evt) {
7171

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

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

86-
mcdown_url_button.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
86+
mcdown_url_button.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
8787
mcdown_url_button.setText("Copy MegaBasterd download URL");
8888
mcdown_url_button.setDoubleBuffered(true);
8989
mcdown_url_button.addActionListener(new java.awt.event.ActionListener() {
@@ -127,14 +127,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
127127
.addGroup(layout.createSequentialGroup()
128128
.addContainerGap()
129129
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
130-
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
131-
.addComponent(subtitle_label)
132-
.addGap(0, 0, Short.MAX_VALUE))
133-
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
134-
.addGap(0, 0, Short.MAX_VALUE)
135-
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
136-
.addComponent(mcdown_url_button, javax.swing.GroupLayout.Alignment.TRAILING)
137-
.addComponent(check_version_button, javax.swing.GroupLayout.Alignment.TRAILING)))
138130
.addGroup(layout.createSequentialGroup()
139131
.addComponent(made_in_spain_label)
140132
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
@@ -144,7 +136,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
144136
.addComponent(pica_roja_label)
145137
.addGap(18, 18, 18)
146138
.addComponent(mc_logo_label))))
147-
.addComponent(title_label, javax.swing.GroupLayout.DEFAULT_SIZE, 546, Short.MAX_VALUE))
139+
.addComponent(title_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
140+
.addGroup(layout.createSequentialGroup()
141+
.addComponent(subtitle_label)
142+
.addGap(0, 0, Short.MAX_VALUE))
143+
.addGroup(layout.createSequentialGroup()
144+
.addComponent(mcdown_url_button)
145+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
146+
.addComponent(check_version_button)))
148147
.addContainerGap())
149148
);
150149
layout.setVerticalGroup(
@@ -155,9 +154,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
155154
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
156155
.addComponent(subtitle_label)
157156
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
158-
.addComponent(mcdown_url_button)
159-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
160-
.addComponent(check_version_button)
157+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
158+
.addComponent(mcdown_url_button)
159+
.addComponent(check_version_button))
161160
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
162161
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
163162
.addComponent(made_in_spain_label)

src/megabasterd/ChunkUploader.java

+18-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public CloseableHttpResponse call() throws IOException {
237237

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

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

242242
error = true;
243243

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

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

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

262+
if (tot_bytes_up > 0) {
263+
264+
_upload.getPartialProgress().add(-1 * tot_bytes_up);
265+
266+
_upload.getProgress_meter().secureNotify();
267+
}
268+
260269
conta_error++;
261270

262271
if (!_exit) {
@@ -285,6 +294,8 @@ public CloseableHttpResponse call() throws IOException {
285294

286295
} catch (ExecutionException | InterruptedException | CancellationException exception) {
287296

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

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

308+
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, exception);
309+
297310
} finally {
298311

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

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

342357
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
358+
343359
} catch (URISyntaxException ex) {
360+
344361
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);
345362
}
346363

src/megabasterd/ChunkUploaderMono.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ public CloseableHttpResponse call() throws IOException {
150150

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

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

155157
conta_error++;
@@ -187,6 +189,9 @@ public CloseableHttpResponse call() throws IOException {
187189
}
188190

189191
} catch (IOException ex) {
192+
193+
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk.getId()});
194+
190195
error = true;
191196

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

256261
} catch (ExecutionException | InterruptedException | CancellationException exception) {
257262

263+
Logger.getLogger(getClass().getName()).log(Level.WARNING, "{0} Uploading chunk {1} FAILED!...", new Object[]{Thread.currentThread().getName(), chunk.getId()});
264+
258265
error = true;
259266

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

262-
getUpload().getPartialProgress().add(-1 * tot_bytes_up);
269+
if (tot_bytes_up > 0) {
263270

264-
getUpload().getProgress_meter().secureNotify();
271+
getUpload().getPartialProgress().add(-1 * tot_bytes_up);
272+
273+
getUpload().getProgress_meter().secureNotify();
274+
}
265275

266276
} finally {
267277

src/megabasterd/LinkGrabberDialog.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ public void run() {
394394
@Override
395395
public void notifyClipboardChange() {
396396

397-
swingReflectionInvoke("setText", links_textarea, extractMegaLinksFromString(extractStringFromClipboardContents(_clipboardspy.getContents())));
397+
String current_text = (String) swingReflectionInvokeAndWaitForReturn("getText", links_textarea);
398+
399+
swingReflectionInvoke("append", links_textarea, (current_text.length() > 0 ? "\n\n" : "") + extractMegaLinksFromString(extractStringFromClipboardContents(_clipboardspy.getContents())));
398400
}
399401
}

src/megabasterd/MainPanel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
public final class MainPanel {
4747

48-
public static final String VERSION = "2.41";
48+
public static final String VERSION = "2.42";
4949
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
5050
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
5151
public static final int STREAMER_PORT = 1337;

src/megabasterd/MainPanelView.form

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
5454
<Font name="Dialog" size="18" style="0"/>
5555
</Property>
56-
<Property name="text" type="java.lang.String" value="Remove all pre/pro/wait downloads"/>
56+
<Property name="text" type="java.lang.String" value="Remove all no running downloads"/>
5757
</Properties>
5858
<Events>
5959
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clean_all_down_menuActionPerformed"/>
@@ -64,7 +64,7 @@
6464
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
6565
<Font name="Dialog" size="18" style="0"/>
6666
</Property>
67-
<Property name="text" type="java.lang.String" value="Remove all pre/pro/wait uploads"/>
67+
<Property name="text" type="java.lang.String" value="Remove all no running uploads"/>
6868
</Properties>
6969
<Events>
7070
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clean_all_up_menuActionPerformed"/>
@@ -88,7 +88,7 @@
8888
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
8989
<Font name="Dialog" size="18" style="0"/>
9090
</Property>
91-
<Property name="text" type="java.lang.String" value="EXIT"/>
91+
<Property name="text" type="java.lang.String" value="Exit"/>
9292
</Properties>
9393
<Events>
9494
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="exit_menuActionPerformed"/>
@@ -184,7 +184,7 @@
184184
<Group type="103" groupAlignment="0" attributes="0">
185185
<Group type="102" alignment="0" attributes="0">
186186
<EmptySpace max="-2" attributes="0"/>
187-
<Component id="jTabbedPane1" pref="482" max="32767" attributes="0"/>
187+
<Component id="jTabbedPane1" max="32767" attributes="0"/>
188188
<EmptySpace max="-2" attributes="0"/>
189189
<Group type="103" groupAlignment="1" attributes="0">
190190
<Component id="logo_label" min="-2" max="-2" attributes="0"/>

src/megabasterd/MainPanelView.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
360360
file_menu.add(jSeparator4);
361361

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

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

390390
exit_menu.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
391-
exit_menu.setText("EXIT");
391+
exit_menu.setText("Exit");
392392
exit_menu.addActionListener(new java.awt.event.ActionListener() {
393393
public void actionPerformed(java.awt.event.ActionEvent evt) {
394394
exit_menuActionPerformed(evt);
@@ -448,7 +448,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
448448
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
449449
.addGroup(layout.createSequentialGroup()
450450
.addContainerGap()
451-
.addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)
451+
.addComponent(jTabbedPane1)
452452
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
453453
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
454454
.addComponent(logo_label)

0 commit comments

Comments
 (0)