SmartProxy ban time optimization
Resume downloads/uploads fix
GUI minor fixes
This commit is contained in:
tonikelope 2023-10-23 19:10:12 +02:00
parent 9f9a1fc1ed
commit 78beea10ef
10 changed files with 140 additions and 139 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>8.3</version>
<version>8.4</version>
<packaging>jar</packaging>
<repositories>
<repository>

View File

@ -245,7 +245,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
} else if (tot_bytes_up == chunk_size || reads == -1) {
if (_upload.getProgress() == _upload.getFile_size()) {
_upload.getView().printStatusNormal("Waiting for completion handler ... ***DO NOT EXIT MEGABASTERD NOW***");
_upload.getView().printStatusWarning("Waiting for completion handler ... ***DO NOT EXIT MEGABASTERD NOW***");
_upload.getView().getPause_button().setEnabled(false);
}

View File

@ -70,15 +70,6 @@
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Files">
<Font PropertyName="font" name="Noto Sans" size="18" style="0"/>
</TitledBorder>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
@ -88,7 +79,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="file_tree_scrollpane" alignment="0" pref="165" max="32767" attributes="0"/>
<Component id="file_tree_scrollpane" alignment="0" pref="236" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
@ -121,19 +112,12 @@
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel2">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Upload info"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="upload_log_checkbox" min="-2" max="-2" attributes="0"/>
@ -162,7 +146,7 @@
</Group>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -174,11 +158,11 @@
<Component id="dir_name_label" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="dir_name_textfield" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="account_label" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="account_combobox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="copy_email_button" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="account_combobox" max="32767" attributes="0"/>
<Component id="copy_email_button" alignment="3" min="-2" pref="38" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="used_space_label" min="-2" max="-2" attributes="0"/>
@ -192,7 +176,7 @@
<Component id="upload_log_checkbox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="priority_checkbox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -354,7 +338,7 @@
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="0" red="0" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" value="[0 B]"/>
<Property name="text" type="java.lang.String" value="[---]"/>
<Property name="doubleBuffered" type="boolean" value="true"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>

View File

@ -115,10 +115,6 @@ public class FileGrabberDialog extends javax.swing.JDialog {
updateFonts(this, GUI_FONT, _main_panel.getZoom_factor());
updateTitledBorderFont(((javax.swing.border.TitledBorder) jPanel1.getBorder()), GUI_FONT, _main_panel.getZoom_factor());
updateTitledBorderFont(((javax.swing.border.TitledBorder) jPanel2.getBorder()), GUI_FONT, _main_panel.getZoom_factor());
translateLabels(this);
jPanel1.setDropTarget(
@ -270,8 +266,6 @@ public class FileGrabberDialog extends javax.swing.JDialog {
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("File Grabber");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Files", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Noto Sans", 0, 18))); // NOI18N
file_tree.setBorder(null);
file_tree.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root");
@ -289,11 +283,9 @@ public class FileGrabberDialog extends javax.swing.JDialog {
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(file_tree_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
.addComponent(file_tree_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE)
);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Upload info"));
dir_name_label.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
dir_name_label.setText("Upload name:");
dir_name_label.setDoubleBuffered(true);
@ -370,7 +362,7 @@ public class FileGrabberDialog extends javax.swing.JDialog {
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGap(0, 0, 0)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(upload_log_checkbox)
@ -392,7 +384,7 @@ public class FileGrabberDialog extends javax.swing.JDialog {
.addComponent(account_combobox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(copy_email_button)))))
.addContainerGap())
.addGap(0, 0, 0))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -401,11 +393,11 @@ public class FileGrabberDialog extends javax.swing.JDialog {
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(dir_name_label)
.addComponent(dir_name_textfield, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(account_label)
.addComponent(account_combobox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(copy_email_button))
.addComponent(account_combobox)
.addComponent(copy_email_button, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(used_space_label)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@ -416,7 +408,7 @@ public class FileGrabberDialog extends javax.swing.JDialog {
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(upload_log_checkbox)
.addComponent(priority_checkbox))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
dance_button.setBackground(new java.awt.Color(102, 204, 255));
@ -433,7 +425,7 @@ public class FileGrabberDialog extends javax.swing.JDialog {
total_file_size_label.setFont(new java.awt.Font("Dialog", 1, 32)); // NOI18N
total_file_size_label.setForeground(new java.awt.Color(0, 0, 255));
total_file_size_label.setText("[0 B]");
total_file_size_label.setText("[---]");
total_file_size_label.setDoubleBuffered(true);
total_file_size_label.setEnabled(false);

View File

@ -70,7 +70,7 @@ import javax.swing.UIManager;
*/
public final class MainPanel {
public static final String VERSION = "8.3";
public static final String VERSION = "8.4";
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
@ -1256,32 +1256,38 @@ public final class MainPanel {
while (downloads_queue_iterator.hasNext()) {
String url = (String) downloads_queue_iterator.next();
try {
HashMap<String, Object> o = res.remove(url);
String url = (String) downloads_queue_iterator.next();
if (o != null) {
HashMap<String, Object> o = res.remove(url);
String email = (String) o.get("email");
if (o != null) {
if (_mega_accounts.get(email) == null) {
email = null;
String email = (String) o.get("email");
if (_mega_accounts.get(email) == null) {
email = null;
}
MegaAPI ma = new MegaAPI();
if (email == null || !tthis.isUse_mega_account_down() || (ma = checkMegaAccountLoginAndShowMasterPassDialog(tthis, getView(), email)) != null) {
Download download = new Download(tthis, ma, (String) url, (String) o.get("path"), (String) o.get("filename"), (String) o.get("filekey"), (Long) o.get("filesize"), (String) o.get("filepass"), (String) o.get("filenoexpire"), _use_slots_down, false, (String) o.get("custom_chunks_dir"), false);
getDownload_manager().getTransference_provision_queue().add(download);
conta_downloads++;
downloads_queue_iterator.remove();
} else {
tot_downloads--;
}
}
MegaAPI ma = new MegaAPI();
if (email == null || !tthis.isUse_mega_account_down() || (ma = checkMegaAccountLoginAndShowMasterPassDialog(tthis, getView(), email)) != null) {
Download download = new Download(tthis, ma, (String) url, (String) o.get("path"), (String) o.get("filename"), (String) o.get("filekey"), (Long) o.get("filesize"), (String) o.get("filepass"), (String) o.get("filenoexpire"), _use_slots_down, false, (String) o.get("custom_chunks_dir"), false);
getDownload_manager().getTransference_provision_queue().add(download);
conta_downloads++;
downloads_queue_iterator.remove();
} else {
tot_downloads--;
}
} catch (Exception ex) {
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex);
}
}
@ -1295,34 +1301,39 @@ public final class MainPanel {
for (Map.Entry<String, HashMap<String, Object>> entry : res.entrySet()) {
String email = (String) entry.getValue().get("email");
try {
if (_mega_accounts.get(email) == null) {
email = null;
String email = (String) entry.getValue().get("email");
if (_mega_accounts.get(email) == null) {
email = null;
}
MegaAPI ma = new MegaAPI();
if (email == null || !tthis.isUse_mega_account_down() || (ma = checkMegaAccountLoginAndShowMasterPassDialog(tthis, getView(), email)) != null) {
Download download = new Download(tthis, ma, (String) entry.getKey(), (String) entry.getValue().get("path"), (String) entry.getValue().get("filename"), (String) entry.getValue().get("filekey"), (Long) entry.getValue().get("filesize"), (String) entry.getValue().get("filepass"), (String) entry.getValue().get("filenoexpire"), _use_slots_down, false, (String) entry.getValue().get("custom_chunks_dir"), false);
getDownload_manager().getTransference_provision_queue().add(download);
conta_downloads++;
} else {
tot_downloads--;
}
} catch (Exception ex) {
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex);
}
MegaAPI ma = new MegaAPI();
if (email == null || !tthis.isUse_mega_account_down() || (ma = checkMegaAccountLoginAndShowMasterPassDialog(tthis, getView(), email)) != null) {
Download download = new Download(tthis, ma, (String) entry.getKey(), (String) entry.getValue().get("path"), (String) entry.getValue().get("filename"), (String) entry.getValue().get("filekey"), (Long) entry.getValue().get("filesize"), (String) entry.getValue().get("filepass"), (String) entry.getValue().get("filenoexpire"), _use_slots_down, false, (String) entry.getValue().get("custom_chunks_dir"), false);
getDownload_manager().getTransference_provision_queue().add(download);
conta_downloads++;
} else {
tot_downloads--;
}
}
}
} catch (SQLException ex) {
} catch (Exception ex) {
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex);
} catch (Exception ex2) {
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex2);
}
if (conta_downloads > 0) {
@ -1452,39 +1463,44 @@ public final class MainPanel {
while (uploads_queue_iterator.hasNext()) {
String filename = (String) uploads_queue_iterator.next();
try {
String filename = (String) uploads_queue_iterator.next();
HashMap<String, Object> o = res.remove(filename);
HashMap<String, Object> o = res.remove(filename);
if (o != null) {
if (o != null) {
String email = (String) o.get("email");
String email = (String) o.get("email");
if (_mega_accounts.get(email) != null) {
if (_mega_accounts.get(email) != null) {
MegaAPI ma;
MegaAPI ma;
if ((ma = checkMegaAccountLoginAndShowMasterPassDialog(tthis, getView(), email)) != null) {
if ((ma = checkMegaAccountLoginAndShowMasterPassDialog(tthis, getView(), email)) != null) {
Upload upload = new Upload(tthis, ma, (String) filename, (String) o.get("parent_node"), (String) o.get("ul_key") != null ? bin2i32a(BASE642Bin((String) o.get("ul_key"))) : null, (String) o.get("url"), (String) o.get("root_node"), BASE642Bin((String) o.get("share_key")), (String) o.get("folder_link"), false);
Upload upload = new Upload(tthis, ma, (String) filename, (String) o.get("parent_node"), (String) o.get("ul_key") != null ? bin2i32a(BASE642Bin((String) o.get("ul_key"))) : null, (String) o.get("url"), (String) o.get("root_node"), BASE642Bin((String) o.get("share_key")), (String) o.get("folder_link"), false);
getUpload_manager().getTransference_provision_queue().add(upload);
getUpload_manager().getTransference_provision_queue().add(upload);
conta_uploads++;
conta_uploads++;
uploads_queue_iterator.remove();
}
} else {
deleteUpload((String) o.get("filename"), email);
tot_uploads--;
uploads_queue_iterator.remove();
}
} else {
deleteUpload((String) o.get("filename"), email);
tot_uploads--;
uploads_queue_iterator.remove();
}
} catch (Exception ex) {
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex);
}
}
@ -1498,38 +1514,41 @@ public final class MainPanel {
for (Map.Entry<String, HashMap<String, Object>> entry : res.entrySet()) {
String email = (String) entry.getValue().get("email");
try {
String email = (String) entry.getValue().get("email");
if (_mega_accounts.get(email) != null) {
if (_mega_accounts.get(email) != null) {
MegaAPI ma;
MegaAPI ma;
if ((ma = checkMegaAccountLoginAndShowMasterPassDialog(tthis, getView(), email)) != null) {
if ((ma = checkMegaAccountLoginAndShowMasterPassDialog(tthis, getView(), email)) != null) {
Upload upload = new Upload(tthis, ma, (String) entry.getKey(), (String) entry.getValue().get("parent_node"), (String) entry.getValue().get("ul_key") != null ? bin2i32a(BASE642Bin((String) entry.getValue().get("ul_key"))) : null, (String) entry.getValue().get("url"), (String) entry.getValue().get("root_node"), BASE642Bin((String) entry.getValue().get("share_key")), (String) entry.getValue().get("folder_link"), false);
Upload upload = new Upload(tthis, ma, (String) entry.getKey(), (String) entry.getValue().get("parent_node"), (String) entry.getValue().get("ul_key") != null ? bin2i32a(BASE642Bin((String) entry.getValue().get("ul_key"))) : null, (String) entry.getValue().get("url"), (String) entry.getValue().get("root_node"), BASE642Bin((String) entry.getValue().get("share_key")), (String) entry.getValue().get("folder_link"), false);
getUpload_manager().getTransference_provision_queue().add(upload);
getUpload_manager().getTransference_provision_queue().add(upload);
conta_uploads++;
conta_uploads++;
uploads_queue_iterator.remove();
uploads_queue_iterator.remove();
}
} else {
deleteUpload((String) entry.getValue().get("filename"), email);
tot_uploads--;
}
} else {
deleteUpload((String) entry.getValue().get("filename"), email);
tot_uploads--;
} catch (Exception ex) {
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex);
}
}
}
} catch (SQLException ex) {
} catch (Exception ex) {
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex);
} catch (Exception ex2) {
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex2);
}
if (conta_uploads > 0) {
@ -1550,7 +1569,8 @@ public final class MainPanel {
MiscTools.GUIRun(() -> {
getView().getStatus_up_label().setText("");
});
});
}
);
}
}

View File

@ -291,7 +291,11 @@ public final class MainPanelView extends javax.swing.JFrame {
try {
LOG.log(Level.INFO, "{0} FILE_PATH -> {1}", new Object[]{Thread.currentThread().getName(), file_path});
if (!file_path.isEmpty()) {
LOG.log(Level.INFO, "{0} FILE_PATH -> {1}", new Object[]{Thread.currentThread().getName(), file_path});
}
String[] dirs = file_path.split("\\" + File.separator);
@ -301,10 +305,10 @@ public final class MainPanelView extends javax.swing.JFrame {
for (String d : dirs) {
LOG.log(Level.INFO, "{0} DIR -> {1}", new Object[]{Thread.currentThread().getName(), d});
if (!d.isEmpty()) {
LOG.log(Level.INFO, "{0} DIR -> {1}", new Object[]{Thread.currentThread().getName(), d});
if (current_node.getChildren().get(d) != null) {
current_node = current_node.getChildren().get(d);

View File

@ -50,10 +50,6 @@ public final class SmartMegaProxyManager {
private volatile int _proxy_timeout;
private volatile boolean _force_smart_proxy;
public int getBan_time() {
return _ban_time;
}
public int getProxy_timeout() {
return _proxy_timeout;
}
@ -82,7 +78,7 @@ public final class SmartMegaProxyManager {
for (String k : _proxy_list.keySet()) {
if (_proxy_list.get(k)[0] > current_time) {
if (_proxy_list.get(k)[0] != -1 && _proxy_list.get(k)[0] > current_time - _ban_time * 1000) {
i++;
}
@ -140,7 +136,7 @@ public final class SmartMegaProxyManager {
for (String k : keysList) {
if (_proxy_list.get(k)[0] < current_time && (excluded == null || !excluded.contains(k))) {
if ((_proxy_list.get(k)[0] == -1 || _proxy_list.get(k)[0] < current_time - _ban_time * 1000) && (excluded == null || !excluded.contains(k))) {
return new String[]{k, _proxy_list.get(k)[1] == -1L ? "http" : "socks"};
}
@ -174,7 +170,7 @@ public final class SmartMegaProxyManager {
Long[] proxy_data = _proxy_list.get(proxy);
proxy_data[0] = System.currentTimeMillis() + this._ban_time * 1000;
proxy_data[0] = System.currentTimeMillis();
_proxy_list.put(proxy, proxy_data);
@ -219,8 +215,6 @@ public final class SmartMegaProxyManager {
if (!custom_list.isEmpty()) {
Long current_time = System.currentTimeMillis();
for (String proxy : custom_list) {
boolean socks = false;
@ -237,13 +231,13 @@ public final class SmartMegaProxyManager {
custom_clean_list_auth.put(proxy_parts[0], proxy_parts[1]);
Long[] proxy_data = new Long[]{current_time, socks ? 1L : -1L};
Long[] proxy_data = new Long[]{-1L, socks ? 1L : -1L};
custom_clean_list.put(proxy_parts[0], proxy_data);
} else if (proxy.trim().matches(".+?:[0-9]{1,5}")) {
Long[] proxy_data = new Long[]{current_time, socks ? 1L : -1L};
Long[] proxy_data = new Long[]{-1L, socks ? 1L : -1L};
custom_clean_list.put(proxy, proxy_data);
}
@ -298,8 +292,6 @@ public final class SmartMegaProxyManager {
PROXY_LIST_AUTH.clear();
Long current_time = System.currentTimeMillis();
for (String proxy : proxy_list) {
boolean socks = false;
@ -316,12 +308,12 @@ public final class SmartMegaProxyManager {
PROXY_LIST_AUTH.put(proxy_parts[0], proxy_parts[1]);
Long[] proxy_data = new Long[]{current_time, socks ? 1L : -1L};
Long[] proxy_data = new Long[]{-1L, socks ? 1L : -1L};
_proxy_list.put(proxy_parts[0], proxy_data);
} else if (proxy.trim().matches(".+?:[0-9]{1,5}")) {
Long[] proxy_data = new Long[]{current_time, socks ? 1L : -1L};
Long[] proxy_data = new Long[]{-1L, socks ? 1L : -1L};
_proxy_list.put(proxy, proxy_data);
}

View File

@ -906,7 +906,7 @@ public class Upload implements Transference, Runnable, SecureSingleThreadNotifia
LOG.log(Level.INFO, "{0} Uploader creating NEW MEGA NODE {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()});
getView().printStatusNormal("Creating new MEGA node ... ***DO NOT EXIT MEGABASTERD NOW***");
getView().printStatusWarning("Creating new MEGA node ... ***DO NOT EXIT MEGABASTERD NOW***");
File f = new File(_file_name);
@ -960,7 +960,7 @@ public class Upload implements Transference, Runnable, SecureSingleThreadNotifia
if (_thumbnail_file != null) {
getView().printStatusNormal("Creating thumbnail ... ***DO NOT EXIT MEGABASTERD NOW***");
getView().printStatusWarning("Creating thumbnail ... ***DO NOT EXIT MEGABASTERD NOW***");
if (!Files.isReadable(Paths.get(_thumbnail_file))) {
Thumbnailer thumbnailer = new Thumbnailer();
@ -968,7 +968,7 @@ public class Upload implements Transference, Runnable, SecureSingleThreadNotifia
_thumbnail_file = thumbnailer.createThumbnail(_file_name);
}
getView().printStatusNormal("Uploading thumbnail ... ***DO NOT EXIT MEGABASTERD NOW***");
getView().printStatusWarning("Uploading thumbnail ... ***DO NOT EXIT MEGABASTERD NOW***");
_ma.uploadThumbnails(this, _fid, _thumbnail_file, _thumbnail_file);

View File

@ -665,6 +665,15 @@ public class UploadView extends javax.swing.JPanel implements TransferenceView {
}
public void printStatusWarning(final String message) {
MiscTools.GUIRunAndWait(() -> {
status_label.setForeground(new Color(255, 0, 255));
status_label.setText(LabelTranslatorSingleton.getInstance().translate(message));
});
}
@Override
public void updateSlotsStatus() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 202 KiB