Build scripts:

-refs #89390
-updated Manifest for Synthetica/Java16
GoogleDriveDirectoryIndex:
-updated to handle response code 405
-updated to extend antiDDoSForDecrypt
OneFichierComFolder:
-fixes thread 87017
-caused by pattern change in host plugin
build>full

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@43990 ebf7c1c2-ba36-0410-9fe8-c592906822b4

Former-commit-id: a6138b37b5d692a61348a55199002883b2ef7e92
This commit is contained in:
jiaz 2021-03-22 12:05:34 +00:00
parent 8196cffb9a
commit 8569632b4c
5 changed files with 34 additions and 23 deletions

View File

@ -22,7 +22,7 @@
<path id="classpath">
<fileset dir="${cls}" />
<fileset dir="${res}/libs" includes="**/*.jar" />
<fileset dir="${res}/libs_ext" includes="**/*.jar" />
<!-- Dependencies -->
@ -111,14 +111,14 @@
<copy todir="${dist}/libs">
<fileset dir="${res}/libs" includes="**/*">
<exclude name="**/*.info" />
</fileset>
</copy>
<copy todir="${dist}/libs">
<fileset dir="${dep.awu}/libs" includes="**/*.jar">
<exclude name="miglayout.jar" />
<exclude name="**/*.info" />
<exclude name="**/*jackson*"/>
<exclude name="**/*jackson*" />
</fileset>
</copy>
<copy todir="${dist}/libs">
@ -136,11 +136,11 @@
</copy>
<copy todir="${dist}/licenses">
<fileset dir="${dep.awu}/libs/" includes="**/*.info" excludes="**/*jackson*" />
<fileset dir="${dep.jdc}/libs/" includes="**/*.info" />
<fileset dir="${dep.browser}/libs/" includes="**/*.info" />
<fileset dir="${res}/licenses" includes="**/*" />
<fileset dir="${res}/licenses" includes="**/*" />
<fileset dir="${res}/libs/" includes="**/*.info" />
</copy>
@ -367,6 +367,10 @@
<manifest file="${dist}/Manifest.MF">
<attribute name="Created-By" value="Appwork GmbH and JDownloader Community" />
<attribute name="Main-Class" value="org.jdownloader.update.launcher.JDLauncher" />
<!-- Synthetica JPMS, http://www.javasoft.de/synthetica/faq/#general-23-->
<attribute name="Add-Exports" value="java.desktop/sun.swing java.desktop/sun.swing.table java.desktop/sun.swing.plaf.synth java.desktop/com.sun.java.swing.plaf.windows java.desktop/sun.awt.shell java.desktop/com.sun.awt java.base/sun.security.action" />
<attribute name="Add-Opens" value="java.desktop/javax.swing.plaf.synth java.desktop/javax.swing.plaf.basic java.desktop/javax.swing java.desktop/javax.swing.tree java.desktop/java.awt.event" />
<!-- plugins that serialize own classes have to be put in the classpath -->
<!--<attribute name="Class-Path" value="" />-->
@ -408,9 +412,9 @@
</fileset>
<fileset dir="${dep.jdupdateclient}/src">
<include name="resources/**/*" />
<exclude name="**/*.java" />
</fileset>
<include name="resources/**/*" />
<exclude name="**/*.java" />
</fileset>
<fileset dir="themes">
<include name="themes/standard/**/images/dialog/**/*" />
<include name="themes/standard/**/images/update*" />

View File

@ -255,6 +255,9 @@
<manifest file="${dist}/Manifest.MF">
<attribute name="Created-By" value="Appwork GmbH and JDownloader Community" />
<attribute name="Main-Class" value="org.jdownloader.launcher.JDLauncher" />
<!-- Synthetica JPMS, http://www.javasoft.de/synthetica/faq/#general-23-->
<attribute name="Add-Exports" value="java.desktop/sun.swing java.desktop/sun.swing.table java.desktop/sun.swing.plaf.synth java.desktop/com.sun.java.swing.plaf.windows java.desktop/sun.awt.shell java.desktop/com.sun.awt java.base/sun.security.action" />
<attribute name="Add-Opens" value="java.desktop/javax.swing.plaf.synth java.desktop/javax.swing.plaf.basic java.desktop/javax.swing java.desktop/javax.swing.tree java.desktop/java.awt.event" />
<!-- plugins that serialize own classes have to be put in the classpath -->
<!--<attribute name="Class-Path" value="" />-->
</manifest>

View File

@ -19,10 +19,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.appwork.utils.StringUtils;
import org.appwork.utils.parser.UrlQuery;
import org.jdownloader.scripting.JavaScriptEngineFactory;
import jd.PluginWrapper;
import jd.controlling.AccountController;
import jd.controlling.ProgressController;
@ -40,11 +36,15 @@ import jd.plugins.FilePackage;
import jd.plugins.LinkStatus;
import jd.plugins.Plugin;
import jd.plugins.PluginException;
import jd.plugins.PluginForDecrypt;
import jd.plugins.PluginForHost;
import org.appwork.utils.StringUtils;
import org.appwork.utils.parser.UrlQuery;
import org.jdownloader.plugins.components.antiDDoSForDecrypt;
import org.jdownloader.scripting.JavaScriptEngineFactory;
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 3, names = { "workers.dev" }, urls = { "https?://(?:[a-z0-9\\-\\.]+\\.)?workers\\.dev/.+" })
public class GoogleDriveDirectoryIndex extends PluginForDecrypt {
public class GoogleDriveDirectoryIndex extends antiDDoSForDecrypt {
@Override
public String[] siteSupportedNames() {
return new String[] { getHost() };
@ -73,7 +73,11 @@ public class GoogleDriveDirectoryIndex extends PluginForDecrypt {
((jd.plugins.hoster.GoogleDriveDirectoryIndex) plg).login(acc, false);
}
br.getHeaders().put("x-requested-with", "XMLHttpRequest");
final URLConnectionAdapter con = br.openPostConnection(param.getCryptedUrl(), "password=&page_token=&page_index=0");
URLConnectionAdapter con = openAntiDDoSRequestConnection(br, br.createPostRequest(param.getCryptedUrl(), "password=&page_token=&page_index=0"));
if (con.getResponseCode() == 405) {
br.followConnection(true);
con = openAntiDDoSRequestConnection(br, br.createGetRequest(param.getCryptedUrl()));
}
if (con.isContentDisposition()) {
con.disconnect();
final DownloadLink dl = new DownloadLink(null, null, this.getHost(), param.getCryptedUrl(), true);
@ -193,7 +197,7 @@ public class GoogleDriveDirectoryIndex extends PluginForDecrypt {
query.add("password", "");
query.add("page_index", Integer.toString(page));
query.appendEncoded("page_token", nextPageToken);
br.postPage(br.getURL(), query);
sendRequest(br.createPostRequest(br.getURL(), query));
}
} while (true);
}

View File

@ -20,10 +20,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.appwork.storage.JSonStorage;
import org.appwork.storage.TypeRef;
import org.appwork.utils.formatter.SizeFormatter;
import jd.PluginWrapper;
import jd.controlling.AccountController;
import jd.controlling.ProgressController;
@ -45,6 +41,10 @@ import jd.plugins.PluginForDecrypt;
import jd.plugins.hoster.OneFichierCom;
import jd.utils.JDUtilities;
import org.appwork.storage.JSonStorage;
import org.appwork.storage.TypeRef;
import org.appwork.utils.formatter.SizeFormatter;
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 3, names = {}, urls = {})
public class OneFichierComFolder extends PluginForDecrypt {
public OneFichierComFolder(PluginWrapper wrapper) {
@ -156,8 +156,8 @@ public class OneFichierComFolder extends PluginForDecrypt {
}
for (String singleLinkInfo[] : linkInfo) {
final DownloadLink dl = createDownloadlink(singleLinkInfo[1]);
dl.setFinalFileName(Encoding.htmlDecode(singleLinkInfo[2]));
dl.setDownloadSize(SizeFormatter.getSize(singleLinkInfo[3]));
dl.setFinalFileName(Encoding.htmlDecode(singleLinkInfo[3]));
dl.setDownloadSize(SizeFormatter.getSize(singleLinkInfo[4]));
if (password != null) {
dl.setDownloadPassword(password);
}

View File

@ -265,7 +265,7 @@ public enum DONATE_EVENT {
}
public static DONATE_EVENT getNow() {
if (true && DebugMode.TRUE_IN_IDE_ELSE_FALSE) {
if (DebugMode.TRUE_IN_IDE_ELSE_FALSE) {
return DONATE_EVENT.DEBUG;
} else {
for (final DONATE_EVENT donateEvent : values()) {