Skip to content

Commit

Permalink
7.46
Browse files Browse the repository at this point in the history
  • Loading branch information
tonikelope committed Oct 17, 2021
1 parent 9057c72 commit 43518ea
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>7.45</version>
<version>7.46</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tonikelope/megabasterd/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
*/
public final class MainPanel {

public static final String VERSION = "7.45";
public static final String VERSION = "7.46";
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;
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/com/tonikelope/megabasterd/MiscTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -1402,16 +1402,19 @@ public static MegaAPI checkMegaAccountLoginAndShowMasterPassDialog(MainPanel mai

public static String newMegaLinks2Legacy(String data) {

data = MiscTools.addHTTPSToMegaLinks(data);
data = MiscTools.addBackSlashToLinks(MiscTools.addHTTPSToMegaLinks(data));

String replace1 = data.replaceAll("(?:https://)?mega(?:\\.co)?\\.nz/folder/([^#]+)#(.+)", "https://mega.nz/#F!$1!$2");

return replace1.replaceAll("(?:https://)?mega(?:\\.co)?\\.nz/file/([^#]+)#(.+)", "https://mega.nz/#!$1!$2");
return data.replaceAll("(?:https://)?mega(?:\\.co)?\\.nz/folder/([^#]+)#([^\r\n]+)", "https://mega.nz/#F!$1!$2").replaceAll("(?:https://)?mega(?:\\.co)?\\.nz/file/([^#]+)#([^\r\n]+)", "https://mega.nz/#!$1!$2");
}

public static String addHTTPSToMegaLinks(String data) {

return data.replaceAll("(?<!http://|https://)mega(?:\\.co)?\\.nz", "https://mega.nz");
return data.replaceAll("(?<!https?://)mega(?:\\.co)?\\.nz", "https://mega.nz");
}

public static String addBackSlashToLinks(String data) {

return data.replaceAll("https?://", "\n$0");
}

/* This method changes the MEGA extension URL to a ordinary MEGA URL,
Expand Down
Binary file modified src/main/resources/images/mbasterd_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 43518ea

Please sign in to comment.