#1921
|
||||
|
||||
![]()
@TomNguyen: Thank you so much for your help/time. Do you still have the postID to each script/or page? Then you could easily link the script/post directly?
__________________
JD-Dev & Server-Admin |
#1922
|
||||
|
||||
![]()
@JDL1059: list of links? where does the new link come from then? is it normal text/website with links on it or how do you expect JDownloader to check for new links? more details are required in order to help/answer you
__________________
JD-Dev & Server-Admin |
#1923
|
||||
|
||||
![]()
@BillyCool: can you share the script/trigger? you can also send details to support@jdownloader.org
Most likely you are trying to access a special *retry* link in linkcrawler?
__________________
JD-Dev & Server-Admin |
#1924
|
|||
|
|||
![]()
@Jiaz
Here's a basic version that replicates the issue: Code:
disablePermissionChecks(); setNotifyOnException(true); // Run one at a time test1(); // Causes: Security Violation --> Security Violation org.appwork.exceptions.WTFException //test2(); // Causes: WTFException --> what the like just happened here? no lastValidFilePackage function test1() { try { getAllCrawledLinks().forEach(function(link) { log(link.getPackage().getDownloadFolder()); // null when download path is default, otherwise works log(link.getDownloadPath()); // never works }); } catch (ex) { log(ex); } } function test2() { getAllCrawledLinks().forEach(function(link) { log(link.getPackage().getDownloadFolder()); // null when download path is default, otherwise works log(link.getDownloadPath()); // never works }); } function log(text) { writeFile(JD_HOME + '/testing.txt', text + getEnvironment().getNewLine(), true); }
Further findings/thoughts:
|
#1925
|
|||
|
|||
![]() Quote:
I will try to update the list when new script posted by mgpai |
#1926
|
||||
|
||||
![]()
@TomNguyen: Thanks for the followup!
@BillyCool: Thanks for the feedback. Both will be fixed with next core update. Quote:
Quote:
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 12.10.2021 at 11:43. |
#1927
|
|||
|
|||
![]()
@Jiaz Cheers
![]() |
#1928
|
||||
|
||||
![]()
@BillyCool: update will be available in about 5 minutes
__________________
JD-Dev & Server-Admin |
#1929
|
|||
|
|||
![]()
@Jiaz: What is this about? Can't seem to find related post in this thread.
|
#1930
|
||||
|
||||
![]()
@mgpai: see, https://board.jdownloader.org/showpo...postcount=1919
deleted it by accident
__________________
JD-Dev & Server-Admin |
#1931
|
|||
|
|||
![]()
@Jiaz Tested and confirmed working. Thanks again!
|
#1932
|
||||
|
||||
![]()
@BillyCool: Thanks for the feedback and you're welcome
__________________
JD-Dev & Server-Admin |
#1933
|
|||
|
|||
![]()
Hello folks,
Hello folks, I would like to move a package after downloading (and automatically unpacking) to another directory, e.g. for a video download the whole folder including content. Can anyone help me? Reference: https://board.jdownloader.org/showthread.php?t=88774 Last edited by Jiaz; 14.10.2021 at 12:07. |
#1934
|
|||
|
|||
![]() Code:
/* Move extracted files Trigger: Archive extraction finished */ var source = "c:\\downloading"; var destination = "d:\\finished"; archive.extractedFilePaths.forEach(function(filePath) { var newFolder = filePath.parent.toString().replace(source,destination); filePath.moveTo(newFolder); }) |
#1935
|
|||
|
|||
![]()
Unfortunately, this does not work. jD gives the error message "missing; before statement (#1)"
|
#1936
|
||||
|
||||
![]()
@Crais: Just copied/pasted and working fine here. Please make sure to copy the script only, the information in comment section is how to setup the script
__________________
JD-Dev & Server-Admin |
#1937
|
|||
|
|||
![]()
@Jiaz I actually found another issue with CrawledLink.getDownloadPath(). It looks like name changes do not reflect in the output. Here's a sample script with 'None' trigger:
Code:
disablePermissionChecks(); getAllCrawledLinks().forEach(function(link) { log("BEFORE: Download path: " + link.getDownloadPath()); // Correct log("BEFORE: Name: " + link.getName()); // Correct link.setName(link.getName() + ".temp"); log("AFTER: Download path: " + link.getDownloadPath()); // Incorrect, still outputs old name in the download path log("AFTER: Name: " + link.getName()); // Correct }) function log(text) { writeFile(JD_HOME + '/testing.txt', text + getEnvironment().getNewLine(), true); } |
#1938
|
|||
|
|||
![]() Quote:
Hi Jiaz - it would be a list of links i manually input (it could be added to a textfile, or pasted into the jdownloader app itself). I'm not sure exactly the best method, but essentially say i have a list of 10 links that i would like jdownloader to check maybe once a day / week if new files have been added. Over time i would add more links to that said text file. |
#1939
|
|||
|
|||
![]()
Hello i need some help,
i'm running jd2 on a docker container and filebot in another docker container, now i want to run filebot after extraction, i wrote a shell script with a ssh command. My script is running from the command line but in jd2 i got a failure. Thanks for help an sorry for my english ![]() |
#1940
|
||||
|
||||
![]()
@BillyCool: thanks for the report. Will be fixed with next update
@schnacke: sure you have tested that script from within your container (join container and run manually)? the error comes directly from script/environment and looks like some missing environment variables, see superuser.com/questions/782509/unable-to-ssh-cannot-create-dev-null-ssh stackoverflow.com/questions/27663032/boot2docker-command-works-on-shell-but-not-in-script @JDL1059: thanks for the feedback, try to ask mgpai for help with this
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 18.10.2021 at 12:29. |
#1941
|
|||
|
|||
![]()
Hey Jiaz,
this helps a lot Quote:
Thanks! |
#1942
|
||||
|
||||
![]() Quote:
Let me guess, it was /dev/null ![]()
__________________
JD-Dev & Server-Admin |
#1943
|
|||
|
|||
![]()
Yes you're right
![]() |
#1944
|
|||
|
|||
![]() EDIT: Like 3h searching and after 5 minutes of posting I found it: Code:
var folder = getPath("C:\\folder\\"); alert(folder.getChildren().length); Last edited by Bilkoff; 20.10.2021 at 23:18. |
#1945
|
|||
|
|||
![]()
@Bilkoff: The array returned by that method can include both files and folders. isFile() and isDirectory() methods can be used to check the type of object in that array.
|
#1946
|
|||
|
|||
![]() Quote:
![]() |
#1947
|
|||
|
|||
![]()
Hi @mgpai, can you help me with script to download files at random with all the other conditions in tact i.e. total number of downloads, no of downloads per host etc... please?
|
#1948
|
|||
|
|||
![]() Code:
/* Randomize download order Trigger: Download controller started */ var index, priorities = ["HIGHEST", "HIGHER", "HIGH", "DEFAULT", "LOW", "LOWER", "LOWEST"]; getAllDownloadLinks().forEach(function(link) { if (!link.finshed) { index = Math.floor(Math.random() * priorities.length); link.priority = priorities[index]; } }) |
#1949
|
|||
|
|||
![]() Quote:
![]() From what I understand of the code, this will just effect what the container holds when the download controller is started and does not include the new links added after the trigger is started. Isn't it? Edit: I have also added the same script to Trigger "LinkGrabber Bottom Button Pressed". Will this do? Last edited by reddy.shyam; 22.10.2021 at 12:02. |
#1950
|
||||
|
||||
![]()
@mgpai: nice solution
![]() ![]() @reddy.shyam: you could even use "download started" as trigger ![]()
__________________
JD-Dev & Server-Admin |
#1951
|
|||
|
|||
![]() Quote:
![]() ![]() Regarding your solution, If "download started" trigger means every time a new download starts, then don't you think "LinkGrabber Bottom Bar Button Pressed" is better? With "Download started" the list gets re-sorted everytime a new download begins irrespective of new links added or not but with "LinkGrabber Bottom Bar Button Pressed" trigger, re-sorting is done only when new links are added. Is my understanding wrong? |
#1952
|
||||
|
||||
![]()
@reddy.shyam: the list is not sorted but the links priorites are getting changed and thus the download core redo the *what to download next* calculations with each new download.
"LinkGrabber Bottom Bar Button Pressed" -> you will have to add a script/action to the button bar for this to work. It's not about new links added. You can customize the buttom bar with custom actions and then assign scripts to them. You could also use "Download stopped" to only re-prioritize them when a download stopps
__________________
JD-Dev & Server-Admin |
#1953
|
|||
|
|||
![]() Quote:
|
#1954
|
||||
|
||||
![]()
@mgpai
lol creative solution ![]()
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#1955
|
||||
|
||||
![]() Quote:
![]()
__________________
JD-Dev & Server-Admin |
#1956
|
|||
|
|||
![]()
Thanks @Jiaz. Will do a 'inky pinky ponky' and pick up.
![]() |
#1957
|
||||
|
||||
![]()
@reddy.shyam: You're welcome. Whenever you need help, just ask
![]()
__________________
JD-Dev & Server-Admin |
#1958
|
|||
|
|||
![]()
Hi folks! o)
A quick question, how do I get the following boolean setting by script? "Archive Extractor -> Extract archives after download" (Attached image also shows what setting I am looking for.) I can't find the key for the setting anywhere on github or config files of JD. I was able to find correct api, storage and key strings for other settings like: "Archive Extractor -> Enabled" "Archive Extractor -> Extract to following folder" "Archive Extractor -> Extract to.." Any help appreciated! Thank you! o) |
#1959
|
|||
|
|||
![]()
Hi mgpai,
I was referred over by Jiaz from another thread, do you have a script available that can enable or disable "Silent Mode" (or Settings->Advanced Settings->SoundSettings.captchasoundenabled) on a time basis. Basically I want to stop the captchas from waking up the entire household while everyone's asleep. |
#1960
|
|||
|
|||
![]()
It can be done by an "Interval" event script (once a minute e.g.).
I would suggest lowering the volume of the whole system though, as other applications could make weird sounds as well, it may be easier for you as well, if you can't write scripts (yet). There is a tool called "nircmd.exe" out there, create a scheduled task and run it at bed time start to bring the volume down. >nircmd.exe setvolume 0 0 0 Create another scheduled task to bring volume back to normal. >nircmd.exe setvolume 0 65535 65535 Nircmds setvolume reference here: nircmd.nirsoft.net/setvolume.html |
![]() |
Thread Tools | |
Display Modes | |
|
|