#321
|
|||
|
|||
Temporary workaround? : Change system time to Trigger Script > Set Permission > Restore System Time.
Last edited by mgpai; 16.02.2018 at 17:16. Reason: Typo |
#322
|
||||
|
||||
After next Update you'll have new commands
disablePermissionChecks(); enablePermissionChecks(); Update will be available in next 5 mins
__________________
JD-Dev & Server-Admin |
#323
|
|||
|
|||
Thank-you very much ! This will be useful for future scripts as well.
A new update just became available so using myJDownloader I set my "update check" event's interval to 1000ms, disabled and re-enabled the script, and then the permission box appeared. Hopefully now it will not ask for the permissions again since I did not modify the script since accepting the permissions. Thanks ! I just put the command in the beginning of script ? Last edited by RPH; 16.02.2018 at 17:21. |
#324
|
||||
|
||||
just add
disablePermissionChecks(); in beginning of your script to disable checks
__________________
JD-Dev & Server-Admin |
#325
|
|||
|
|||
Superb !
|
#326
|
|||
|
|||
Quote:
Quote:
Edit: @mgpai, I wonder if you'd be so kind as to help me with a related script. This time I want to disable all links in a given package in the Downloads/LinkGrabber list whose file names match file names in the related download folder. So for example if I have a package named "Jan Reports" and it's to be saved to Drive:\PackageName, then the script should match all file names in that package with file names in "Drive:\Jan Reports" and disable all matches. Basically it's the same script as before, except this time the comparison is to actual file names on disk instead of file names in a text file. Is this possible? Last edited by netgearjd; 16.02.2018 at 20:54. |
#327
|
||||
|
||||
@netgearjd: will be available with next update in 5 mins
__________________
JD-Dev & Server-Admin |
#328
|
|||
|
|||
@Jiaz: What function name should I use?
|
#329
|
|||
|
|||
Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/netgearjd_2.js Script updated: Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/netgearjd.js |
#330
|
|||
|
|||
Hi guys, sorry another quick question. With the code below, is it possible to wait for the runUpdateCheck() to finish before checking if an update is available on the next line of code ? Or maybe there is an all in one API that runs the update check and then updates/restarts if there is one ? Also, where can I find a list of JDownlaoder's APIs ?
Or is it possible to runUpdateCheck() using crontab instead ? EDIT: I guess I could just add a sleep() command after calling runUpdateCheck(). Thanks Code:
runUpdateCheck(); if (isDownloadControllerIdle() && isUpdateAvailable()) { interval = 1000; restartAndUpdate(); } //Functions function runUpdateCheck() { callAPI("update", "runUpdateCheck"); } function isUpdateAvailable() { return callAPI("update", "isUpdateAvailable"); } function restartAndUpdate() { callAPI("update", "restartAndUpdate"); } Last edited by RPH; 17.02.2018 at 16:06. |
#331
|
||||
|
||||
@netgearjd
getComment and setComment @RPH: once an update is available, isUpdateAvailable will return true. So I would not think about async check just schedule the script for example all 15 mins. (default is 5 and 60 mins on headless)
__________________
JD-Dev & Server-Admin |
#332
|
|||
|
|||
Quote:
For example: 03:45 AM - Check for updates / download updates - If updates available, install updates 04:00 AM - Start downloads Problem is that runUpdateCheck() doesn't have a return value so the script doesn't wait for the update check to finish before checking if there are updates to install (so they don't get installed). I think I solved this temporarily by adding a sleep(300000) command after runUpdateCheck(). |
#333
|
||||
|
||||
Adding sleep will help yes. You could also enable auto update and JDownloader will check for pending updates itself. Without restart core updates are not installed. Don't see any reason not to enable auto update
__________________
JD-Dev & Server-Admin |
#334
|
|||
|
|||
Other than the ones listed in the editor?
Code:
docs.google.com/document/d/1IGeAwg8bQyaCTeTl_WyjLyBPh4NBOayO0_MAmvP5Mu4 |
#335
|
||||
|
||||
__________________
JD-Dev & Server-Admin |
#336
|
|||
|
|||
Quote:
If there are only non-core updates available, will JDownloader still restart when running the "UpdateAndRestart()" command ? |
#337
|
||||
|
||||
@RPH: Plugin updates can be installed in background without restart. Also headless is minimum timeout 1hour and not what's defined in advanced settings. Only pending core updates require a restart.
restartAndUpdate -> triggers a restart and enforces update check on startup. Headless version always checks for updates on startup
__________________
JD-Dev & Server-Admin |
#338
|
|||
|
|||
Quote:
Code:
runUpdateCheck(); sleep(300000); if (isDownloadControllerIdle() && isUpdateAvailable()) { interval = 1000; restartAndUpdate(); } |
#339
|
||||
|
||||
restartAndUpdate will always restart and force an update check, yes
but only when isUpdateAvailable() is true, which is only the case for pending core updates as runUpdateCheck will install plugin updates in background if possible
__________________
JD-Dev & Server-Admin |
#340
|
|||
|
|||
Ahh, that makes sense, thanks
|
#341
|
|||
|
|||
Quote:
Doesn't work for me? Is there an update? |
#342
|
||||
|
||||
@Taobaibai: Did you make sure to use the correct trigger?
__________________
JD-Dev & Server-Admin |
#343
|
|||
|
|||
this one?
Quote:
|
#344
|
||||
|
||||
Yes, and what exactly doesn't work for you?
__________________
JD-Dev & Server-Admin |
#345
|
|||
|
|||
it extracts while downloading. I just want to finish all my downloads before extracting.
|
#346
|
||||
|
||||
Did you disable autoextraction, see
#Disable Auto Extract in Archive Extractor Also note that links in list must be changed manually first. Select them and rightclick context menu and disable extraction. Changing default value will only affect new added links
__________________
JD-Dev & Server-Admin |
#347
|
|||
|
|||
Quote:
No, it is enabled, so all new Links will be extracted after finishing downloading? |
#348
|
||||
|
||||
I didn't test that script myself but that's what it should do.
Important is that this only works when links in list are set to auto extraction disabled. Default Auto-Extract only affects new added links
__________________
JD-Dev & Server-Admin |
#349
|
|||
|
|||
To extract archives at scheduled time (Runs only once a day. Does not wait for all download to finish), use the old (rewritten) script:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai.js Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai_2.js If you want the links which are currently on your list to be extracted by the script, make sure that 'auto extraction' has been disabled for those links. You can select those links and view/change their extraction settings using "Archive(s)" sub menu in the context menu or "Package/Link Properties Panel" in the bottom tool bar. |
#350
|
|||
|
|||
Quote:
Cheers, seemed obvious but thought it's best to confirm. Quote:
|
#351
|
|||
|
|||
To extract archives only after all downloads have finished, use this new script:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai_2.js Thank you, that was what I was looking for!!!! |
#352
|
||||
|
||||
@netgearjd: we update the static version from time to time. You can always fetch the live one from your own JDownloader. Enable Settings-Advanced Settings-RemoteAPI.deprecatedapienabled and visit localhost:3128/help
You should disable this if not required.
__________________
JD-Dev & Server-Admin |
#353
|
|||
|
|||
Event scripter methods will not be listed in those documents. You can find them in the the script editor help menu. All methods will appear in the built-in list, as and when they are made available by the developers.
|
#354
|
||||
|
||||
@netgearjd: sorry, mixed up api with eventscripter
@mgpai: thanks
__________________
JD-Dev & Server-Admin |
#355
|
|||
|
|||
Good to know, thanks!
|
#356
|
||||
|
||||
Hello, can someone help me to create a simple script, I need to replace the "clearList" script by a script who does the "Start All Downloads" function (see the image). I need to force linkgrabber to send links to downloads (when autoconfirm does not work). I tested several scripts from the documentation, but without success.
I use the "clearList" a long time, because after the jdownloader stays open on for a long time the "autoconfirm" stops working, being necessary to clear the list and start over. |
#357
|
||||
|
||||
@patrik: what exactly doesnt work about *autoconfirm* ? You know about the timeout of it ? maybe auto confirm works but there is a confirmation dialog about offline/incomplete archives and without answering this dialog, nothing will happen.
You can check Settings-Advanced Settings-confirm
__________________
JD-Dev & Server-Admin |
#358
|
|||
|
|||
I'm trying to create a script that does the follow actions:
On a batch download, after each download and extraction finishes I would like to run this command: compact.exe /c /exe:lzx * for every new downloaded file I have tried to do with this Code:
var compact = "compact.exe"; var file = "archive(getExtractedFilePaths).getExtension()"; { callAsync(function() {}, compact, "/c", "/exe:lzx", file); } Where the script is wrong and how can I fix it? |
#359
|
||||
|
||||
@dxzdxz1: syntax and usage looks very wrong.
file is a string "archive(getExtractedFilePaths).getExtension()"? I guess you want the compact.exe called for every file or on the extraction folder?
__________________
JD-Dev & Server-Admin |
#360
|
|||
|
|||
Quote:
Exactly. I want to run compact for every file on the extraction folder. Compact is a built in Windows 10 tool to transparent compression (similar to that old NTFS compression). |
Thread Tools | |
Display Modes | |
|
|