diff --git a/pom.xml b/pom.xml
index 2ea48a73b..f3c9e320b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.tonikelope
MegaBasterd
- 7.92
+ 7.93
jar
diff --git a/src/main/java/com/tonikelope/megabasterd/FolderLinkDialog.java b/src/main/java/com/tonikelope/megabasterd/FolderLinkDialog.java
index 6c0bb8de7..446476ff3 100644
--- a/src/main/java/com/tonikelope/megabasterd/FolderLinkDialog.java
+++ b/src/main/java/com/tonikelope/megabasterd/FolderLinkDialog.java
@@ -607,8 +607,6 @@ private void _genDownloadLiks() {
if (node.isLeaf() && node != root && ((HashMap) node.getUserObject()).get("size") != null) {
- System.out.println(((HashMap) node.getUserObject()).get("name"));
-
String path = "";
Object[] object_path = node.getUserObjectPath();
@@ -620,8 +618,6 @@ private void _genDownloadLiks() {
path = path.replaceAll("^/+", "").replaceAll("^\\+", "").trim();
- System.out.println(path);
-
String url = "https://mega.nz/#N!" + ((Map) node.getUserObject()).get("h") + "!" + ((Map) node.getUserObject()).get("key") + "###n=" + folder_id;
HashMap download_link = new HashMap<>();
diff --git a/src/main/java/com/tonikelope/megabasterd/MainPanel.java b/src/main/java/com/tonikelope/megabasterd/MainPanel.java
index e2646278f..531527d5e 100644
--- a/src/main/java/com/tonikelope/megabasterd/MainPanel.java
+++ b/src/main/java/com/tonikelope/megabasterd/MainPanel.java
@@ -69,7 +69,7 @@
*/
public final class MainPanel {
- public static final String VERSION = "7.92";
+ public static final String VERSION = "7.93";
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;
diff --git a/src/main/java/com/tonikelope/megabasterd/MegaAPI.java b/src/main/java/com/tonikelope/megabasterd/MegaAPI.java
index e27057bc0..419fac3e0 100644
--- a/src/main/java/com/tonikelope/megabasterd/MegaAPI.java
+++ b/src/main/java/com/tonikelope/megabasterd/MegaAPI.java
@@ -35,6 +35,7 @@
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
+import java.util.zip.GZIPInputStream;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLException;
import javax.swing.JProgressBar;
@@ -367,8 +368,6 @@ public void fetchNodes() throws IOException {
private String RAW_REQUEST(String request, URL url_api) throws MegaAPIException {
- System.out.println(request);
-
String response = null, current_smart_proxy = null;
int mega_error = 0, http_error = 0, conta_error = 0, http_status;
@@ -444,6 +443,8 @@ private String RAW_REQUEST(String request, URL url_api) throws MegaAPIException
con.setRequestProperty("Content-type", "text/plain;charset=UTF-8");
+ con.setRequestProperty("Accept-Encoding", "gzip");
+
con.setRequestProperty("User-Agent", MainPanel.DEFAULT_USER_AGENT);
con.setUseCaches(false);
@@ -468,7 +469,7 @@ private String RAW_REQUEST(String request, URL url_api) throws MegaAPIException
} else {
- try (InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
+ try (InputStream is = "gzip".equals(con.getContentEncoding()) ? new GZIPInputStream(con.getInputStream()) : con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
@@ -740,13 +741,10 @@ public String uploadThumbnails(Upload upload, String node_handle, String filenam
String request = "[{\"a\":\"ufa\", \"s\":" + String.valueOf(file_bytes[0].length) + ", \"ssl\":1}, {\"a\":\"ufa\", \"s\":" + String.valueOf(file_bytes[1].length) + ", \"ssl\":1}]";
- System.out.println(request);
URL url_api = new URL(API_URL + "/cs?id=" + String.valueOf(_seqno) + "&v=3&lang=es&domain=meganz&ec=" + (_sid != null ? "&sid=" + _sid : ""));
String res = RAW_REQUEST(request, url_api);
- System.out.println(res);
-
ObjectMapper objectMapper = new ObjectMapper();
HashMap[] res_map = objectMapper.readValue(res, HashMap[].class);
@@ -794,7 +792,6 @@ public String uploadThumbnails(Upload upload, String node_handle, String filenam
hash[h] = MiscTools.Bin2UrlBASE64(byte_res.toByteArray());
- System.out.println(hash[h]);
}
h++;
@@ -806,14 +803,10 @@ public String uploadThumbnails(Upload upload, String node_handle, String filenam
res = RAW_REQUEST(request, url_api);
- System.out.println(request);
-
objectMapper = new ObjectMapper();
String[] resp = objectMapper.readValue(res, String[].class);
- System.out.println((String) resp[0]);
-
return (String) resp[0];
} catch (MegaAPIException mae) {
@@ -1060,7 +1053,7 @@ public HashMap getFolderNodes(String folder_id, String folder_ke
HashMap folder_nodes = null;
- String request = "[{\"a\":\"f\", \"c\":\"1\", \"r\":\"1\"}]";
+ String request = "[{\"a\":\"f\", \"c\":\"1\", \"r\":\"1\", \"ca\":\"1\"}]";
URL url_api = new URL(API_URL + "/cs?id=" + String.valueOf(_seqno) + "&v=3&lang=es&domain=meganz&ec=" + "&n=" + folder_id);
diff --git a/src/main/resources/images/mbasterd_screen.png b/src/main/resources/images/mbasterd_screen.png
index 0ee431eb8..ff050c5d1 100644
Binary files a/src/main/resources/images/mbasterd_screen.png and b/src/main/resources/images/mbasterd_screen.png differ