mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-04-29 22:24:32 +02:00
parent
9057c720d4
commit
43518ea5f2
2
pom.xml
2
pom.xml
@ -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>
|
||||
|
@ -60,7 +60,7 @@ import javax.swing.UIManager;
|
||||
*/
|
||||
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;
|
||||
|
@ -1402,16 +1402,19 @@ public class MiscTools {
|
||||
|
||||
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,
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 179 KiB |
Loading…
x
Reference in New Issue
Block a user