#761
|
||||
|
||||
![]()
What do you mean by that? You can read/write with api methods and toJSObject/toJson. you should also be able to use JSON methods
__________________
JD-Dev & Server-Admin |
#762
|
|||
|
|||
![]() Quote:
Is the stream url always the same ? What do you mean with days hours minutes (launch the download every "D" days, at "H" hour and "M" minutes / wait "D" days, at "H" hour and "M" minutes before running / launch the download every "a day of the week (Friday for example)", at "H" hour and "M" minutes) ? Depending on your answer answer will not be the same. And you could/should consider using "folderwatch" to download a file when it's available. |
#763
|
|||
|
|||
![]()
Hi ,
i would like a script that would allow me to download just a small chunk of lots of files (maybe 1 or 10 MB) (and possibly auto delete them afterwards as well) |
#764
|
|||
|
|||
![]() Quote:
Is something like this what you want ? Code:
var numberOfMB = 10 for (i = getAllDownloadLinks().length - 1; i >= 0; i--) { if (getAllDownloadLinks()[i].getBytesLoaded() > numberOfMB * 1024 * 1024) { getAllDownloadLinks()[i].setEnabled(false); } } You can add this line (after or instead of "getAllDownloadLinks()[i].setEnabled(false);") : Code:
removeDownloadLinkByUUID(getAllDownloadLinks()[i].getUUID()); //or getAllDownloadLinks()[i].remove(); You can also look for the deleteFile() method to erase the downloaded file in combination with the getPath() method. |
#765
|
||||
|
||||
![]()
@bobolecoco: you're trying to become new master of eventscripter
![]() ![]() Thanks for helping out!
__________________
JD-Dev & Server-Admin |
#766
|
|||
|
|||
![]()
I'm pretty sure mgpai will have a better script than mine !
And trying to solve somebody else problems teaches me how to use the eventscripter too. |
#767
|
||||
|
||||
![]()
Great things you will learn, young padawan
![]() ![]()
__________________
JD-Dev & Server-Admin |
#768
|
||||
|
||||
![]() Quote:
Had the days a closer look at the Event Scripter, I can't do the proxy list there, especially sorting, adding and deleting proxies? Or did I overlook a function (call api?)? Especially with Filecrypt this would be helpful if after e.g. 10 calls another proxy would be moved up by sorting. Otherwise I have an error 404 (returned by Filecrypt) although it would be available. EDIT: Solved. (call api read/write with InternetConnectionSettings.customproxylist)
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep. ![]() Last edited by thecoder2012; 06.06.2019 at 18:07. |
#769
|
||||
|
||||
![]()
At the moment there is no trigger for *after 10 calls*.
__________________
JD-Dev & Server-Admin |
#770
|
|||
|
|||
![]()
@Jiaz: How does GeneralSettings.freeproxybalancemode CYCLE work? If the term CYCLE is used in literal sense, would it not mean it will use one proxy after another (in the order they are listed), for each new connection, till it reaches the end of the list and start again from the top?, in which case if this option is selected, will there be a need to sort?
|
#771
|
||||
|
||||
![]()
@mgpai: this one only works for downloads and yes, one after another
__________________
JD-Dev & Server-Admin |
#772
|
|||
|
|||
![]()
I have noticed (also just tried) that if the decrypter (filecrypt.cc in this case) is blacklisted in the direct connection, it will use proxies. Will it cycle for the decrypter in such cases or does it keep only using the first proxy in list. In other words is there a workaround to cycle proxies with decryrpters, or does it only work strictly with downloads?
|
#773
|
||||
|
||||
![]() Quote:
I think no. Quote:
First the small export function in js for crazy config places. Code:
writeFile(JD_HOME + "/tmp/biglist.json", JSON.stringify(callAPI("config", "list"),undefined,4), false); My linkgrabber proxy cycle script: Code:
// LinkGrabber Proxy cycle // Trigger required: "New Crawler Job" var old_proxylist = []; var new_proxylist = []; var first_active = ""; var settings = "org.jdownloader.updatev2.InternetConnectionSettings"; var storage = "cfg/org.jdownloader.settings.InternetConnectionSettings"; old_proxylist = callAPI("config", "get", settings, storage, "customproxylist"); for (var key in old_proxylist) { if (old_proxylist.hasOwnProperty(key)) { if (old_proxylist[key].enabled == true && first_active == "") { first_active = old_proxylist[key]; } else { new_proxylist.push(old_proxylist[key]); } } } new_proxylist.push(first_active); callAPI("config", "set", settings, storage, "customproxylist", new_proxylist);
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep. ![]() |
#774
|
|||
|
|||
![]()
@Jiaz: Thanks for the reply.
@thecoder2012: Thanks for the response. Good to see you found a nice solution to your problem. |
#775
|
||||
|
||||
![]() Quote:
PluginException.LinkStatus.ERROR_IP_BLOCKED, PluginException.LinkStatus.ERROR_HOSTER_TEMPORARILY_UNAVAILABLE or PluginException.LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE in the hoster-/downloadplugin (e.g. shareonline) but in the Event Scripter is "getStatus()"+"getSkippedReason()"+"getFinalLinkStatus()" only "null", why? getEta() has the (retry or maintenance) time or "-1" with IP_BLOCKED. I have no problem with ERROR_FATAL, ERROR_PLUGIN_DEFECT, ERROR_CAPTCHA and ERROR_FILE_NOT_FOUND in the Event Scripter. Code Example: Code:
var links = getAllDownloadLinks(); for (i = 0; i < links.length; i++) { var link = links[i]; alert(link.getEta() + " 1:" + link.getStatus() + " 2:" + link.getSkippedReason() + " 3:" + link.getFinalLinkStatus()); }
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep. ![]() Last edited by thecoder2012; 14.06.2019 at 01:23. |
#776
|
||||
|
||||
![]()
@thecoder2012: those LinkStatus are only used for signals between Controller-Plugin.
getStatus returns String that is internally created for human readonly getSkippedReason returns final SkippedReason getFinalLinkStatus returns final FinalLinkState temp/conditional skip reasons are only *reachable* via getStatus and ONLY when controller assigned the status to the file. What are you trying to find out? Best would be to contact me via support@jdownloader.org so we can do tech chit/chat ![]()
__________________
JD-Dev & Server-Admin |
#777
|
|||
|
|||
![]()
Does anybody know a way to compare links in linkgrabber with files on my hard drive to avoid downloading files I already have (which were not downloaded through JD)? Since linkgrabber only fetches file sizes it's the only - but perhaps good enough - comparable file attribute. The results of such a search/comparison can also be manually checked about if file names are similar. The idea grew from the usage of the tool AllDup (alldup.de/alldup/en_alldup_screenshots.php)
|
#779
|
||||
|
||||
![]()
Faster reset/repeat of waiting times than e.g. retry in 15 minutes or 3 hours (uploaded test).
Quote:
Little better example with uploaded link "uploaded.net/file/xa23c1bz" (start the download, click on stop and try it again, then you have "Download limit has been reached" but NO status or eta in the Event Scripter. ![]() JD Screenshot: ![]() Event Scripter Code:
var links = getAllDownloadLinks(); for (i = 0; i < links.length; i++) { var link = links[i]; if (link.isEnabled()) { alert(link.getHost() + " 0:" + link.getEta() + " 1:" + link.getStatus() + " 2:" + link.getSkippedReason() + " 3:" + link.getFinalLinkStatus()); } } ![]() But I see the reason in myjd: ![]() Can I grab it (e.g. "Download limit has been reached") with other function/callapi?
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep. ![]() Last edited by thecoder2012; 14.06.2019 at 13:09. |
#780
|
||||
|
||||
![]()
should be fixed with next core update
__________________
JD-Dev & Server-Admin |
![]() |
Thread Tools | |
Display Modes | |
|
|