#1801
|
|||
|
|||
done, but it doesn't work, it doesn't do anything.
to get something I have to insert the replace + below, after "if" , where I left the <//.....> in the code posted ... and I have the feeling that in that position you modify all the links, not just the ones that interest me. could I have misinterpreted the chain between "if ..." and {}? I always have problems with (and {... @Jiaz :it would be nice, but I'm not knowledgeable on the subject |
#1802
|
|||
|
|||
You are querying crawled packages instead of crawled links (I didn't notice it earlier).
Edit: Guess you want to modify the package name after all. You will have to query the download host, but replace 'link.package.name'. Please note, the package may contain links from multiple hosts, in which case it could be overwritten for each matching host. Last edited by mgpai; 03.08.2021 at 22:47. |
#1803
|
|||
|
|||
Code:
/* View extracted files Trigger : Downloadlist contextmenu button pressed Customize context menu > Add a new "Eventscripter Trigger" button > Rename it to "View extracted files" */ if (name == "View extracted files") { try { var output = getPath(JD_HOME + "/tmp/archive_info.htm"); var archive = dlSelection.contextLink.archive; var files = archive.info.extractionInfo.files var htm = "<table border=\"1\" align=center cellspacing=0 cellpadding=5]><th>" + archive.name + "</th>"; files.forEach(function(file) { htm += "<tr><td>" + file + "</td></tr>"; }) output.delete(); writeFile(output, htm, true); openURL("file://" + output); } catch (e) {}; } Last edited by mgpai; 04.08.2021 at 17:51. Reason: Added button name check |
#1804
|
||||
|
||||
@mgpai: please note that this only works for extraction within the running session. After restart, those details are not available anymore
__________________
JD-Dev & Server-Admin |
#1805
|
|||
|
|||
It was/is working after a restart. Had also tested it before posting the script. Related files still seem to be present in the cfg/archives folder after a restart. Can you please check and confirm?
|
#1806
|
||||
|
||||
@mgpai: you are absolute right!
__________________
JD-Dev & Server-Admin |
#1807
|
|||
|
|||
I did some testing and I guess the problem arises from the fact that I can't recover the host name. (through alert I always see "undefined" ...) ...
---------- getDownloadHost , or getContainerURL , or downloadHost ---------- > "undefined" I can't find the host of the link that generated the package. Summing up : I go to the web page that interests me, copy the "initial link" I am looking for ---> jd works, finds the files and packages them (OK). now , when the package is finished my script <should> check if the <"initial link"> that generated the package is == to a given host, [or what if the packet "arrives" from a given host? ] (p.s= the files contained in the package are all from the same host) if so make some changes to the package name. .... but at the moment I get "undefined" ... so how do I locate this damn Hostname of the package / starting link (I'm in the CrawledLink / linkgabber window) ??? |
#1808
|
|||
|
|||
Code:
getAllCrawledPackages().forEach(function(package) { var hosts = []; package.getDownloadLinks().forEach(function(link) { var host = link.downloadHost; if (hosts.indexOf(host) == -1) { hosts.push(host); } }) if (hosts.length == 1) { host = hosts[0]; if (host == "myhost.com") { package.name = package.name.replace("old_string", "new_string"); } } }) |
#1809
|
|||
|
|||
Code:
/* Remove orphaned archive settings files from "cfg/archives" folder Trigger : Toolbar button pressed Customize toolbar > Add a new "Eventscripter Trigger" button > Rename it to "Remove archive settings files" */ if (name == "Remove archive settings files") { var ids = []; getAllFilePackages().forEach(function(package) { package.archives.forEach(function(archive) { ids.push(archive.settingsID); }) }) getPath(JD_HOME + "/cfg/archives").children.forEach(function(filePath) { try { var id = filePath.toString().match(/v2_(.+)\.json/)[1]; if (ids.indexOf(id) == -1) { filePath.delete(); } } catch (e) {}; }) } |
#1810
|
|||
|
|||
@mgpai = thanks, it works perfectly.
|
#1811
|
||||
|
||||
Big THANKS to mgpai for his great help/support and his time!
__________________
JD-Dev & Server-Admin |
#1812
|
|||
|
|||
Quote:
Thanks again for the help so far! |
#1813
|
|||
|
|||
Code:
/* Move extracted files Trigger : Archive extraction finished */ archive.extractedFilePaths.forEach(function(filePath) { filePath.moveTo(archive.folder + "/" + archive.name); filePath.parent.delete(); }) |
#1814
|
|||
|
|||
Is there a script enabling to download files from zippy and uloz?
__________________
Aktuelles Windows |
#1815
|
|||
|
|||
If you mean bypass geo-block, I believe there is already a script elsewhere in the forum which uses proxies to do just that.
|
#1816
|
|||
|
|||
Yes, exactly, that is what I meant. So it is not in this thread here, I assume...cannot find one else...keywords to look for are geo blocking script / script geo-block / zippy blocking...or any else?
__________________
Aktuelles Windows |
#1817
|
||||
|
||||
@Dockel: You will have to use working proxies/VPN to bypass the geo restriction by zippy/uloz.
__________________
JD-Dev & Server-Admin |
#1818
|
|||
|
|||
OK, it does not appear to be that easy to do it.
__________________
Aktuelles Windows |
#1819
|
|||
|
|||
Hello! Can someone please make a script as follows...? In case when the download stops on dropped network connection, script makes program to unlimitedly auto force-start retry every 5 seconds untill connection is restored and downlod is finished. Please do not ask why the script is needed as there is not usual network connditions where I am located. Thanks!
|
#1820
|
||||
|
||||
@Dockel: I would just setup working proxy in Settings->Connections that work fine with those hosters. No script required.
__________________
JD-Dev & Server-Admin |
#1821
|
|||
|
|||
@mgpai
Hi. I need an automatism to copy ready extracted files from download folder to a folder on my NAS. Is there a way? Many thanks for every help. Shawn26 |
#1822
|
|||
|
|||
Quote:
Quote:
|
#1823
|
|||
|
|||
Quote:
What message is displayed in the status column for such downloads? |
#1824
|
|||
|
|||
Quote:
You can use packagizer rule to move files after extraction. If you want to preserve the folder structure for extracted files which have sub-folders, you will have to use a script in eventscripter. Provide me example strings of source and destination folders if you need one. |
#1825
|
|||
|
|||
Quote:
Quote:
The log when error pops up - com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="**External links are only visible to Support Staff**>here</a>.</p> <hr> <address>Apache/2.2.22 (Debian) Server at update3.jdownloader.org Port 54322</address> </body></html> ; line: 1, column: 2] |
#1826
|
|||
|
|||
Quote:
I need the status message of downloads (not the log error) to know when to check for connection availability and take appropriate action via script. You can also contact me in JD Chat when you have such downloads on the list. Code:
kiwiirc.com/nextclient/irc.libera.chat/#jdownloader |
#1827
|
|||
|
|||
@iLITT: Try this script. If it does not solve your problem, find me in JD Chat.
Code:
/* Monitor connection Trigger: JDownloader started */ monitorConnection(); function monitorConnection() { var browser, connected, running = isDownloadControllerRunning(); try { browser = getBrowser(); browser.getPage("http" + "://1.1.1.1"); connected = browser.responseCode == 301; } catch (e) {}; running && !connected && stopDownloads(); connected && !running && startDownloads(); sleep(5000); monitorConnection(); } |
#1828
|
|||
|
|||
Quote:
|
#1829
|
|||
|
|||
Ok. Understood. Sorry I thought an alternative solution would also be acceptable to you.
|
#1830
|
|||
|
|||
Quote:
already provided script latter-on. And my previous reply were posted latter anywaysÂ… Yes, of course I am open to other solutions... Just the manner you replied - "I will not make such script you asking for". Anyways, I will try the script and contact you @ chat regarding whether it worked or not... Thanks! |
#1831
|
|||
|
|||
Quote:
I find the packagizer rulez. How can i realise it that i only move special files not all files and than without subfolders (only files)? Many thanks. Shawn26 |
#1832
|
|||
|
|||
You can specify the conditions in the 'if' section of the packagizer rule and move extracted files only when those conditions match.
|
#1833
|
|||
|
|||
Quote:
|
#1834
|
|||
|
|||
Quote:
Many Thanks. Shawn26 |
#1835
|
|||
|
|||
Quote:
You can provide the url if you need help with the rule. |
#1836
|
|||
|
|||
I will download it from SJ.org and will be forwarded to ddownload.com.
But for me, SJ.org is important and not that they are downloaded from ddownload.com. Is this variant also possible? Or is it possible to copy files only from a special folder. Then I would create a rule to move the "wrong" files to another folder and then move the "right" files to my NAS after unzipping them. Many Thanks Shawn26 Last edited by Shawn26; 23.08.2021 at 19:19. |
#1837
|
|||
|
|||
Quote:
Code:
if > sourceurls(s) > contains > sj.org then > move to > /path/to/nas/folder |
#1838
|
|||
|
|||
I had already tried this variant. But it doesn't seem to be "allowed".
I get the message ... "You should know that... ... You cannot use the source or the condition of origin to perform an "after unpacking" action. " Then the check mark next to "Source URL (s) contains" is removed again. What am I doing wrong? Shawn26 |
#1839
|
|||
|
|||
My mistake. I didn't know "that".
If there are identifiers in file/package name or download url, can also use that in the rule instead. Source urls can be used in script, provided such url is stored by JD, which in turn depends on how the links were added. Find me in JD Chat if you could not find a working solution. Code:
kiwiirc.com/nextclient/irc.libera.chat/#jdownloader |
#1840
|
|||
|
|||
Hi,
i've tried this script to update jdownloader (headless on my raspberry pi) when there is nothing to to. i'm not sure its working correctly. whats the "interval" settings? is this the time jdownloader is waiting after the last download finished? i can see "60 * 60 * 1000" in the script. if this is in milliseconds the time jdownloader waits should be 60min. if this is correct jdownloader should be updated every night. but the last 2 days i hade update notification at the morning. is there a log file where i can check whether jdownloader was updated? |
Thread Tools | |
Display Modes | |
|
|