#401
|
|||
|
|||
Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Biohazmatz.js |
#402
|
||||
|
||||
Hello, I'm using this script to generate files with the name I want while I wait for this new functionality (link), however I had a problem recently, I periodically delete the downloadlist to be able to check if the vk.com images have a new version, but it does not can I ignore the duplicates and show an error, can I suppress this error and cause jd to detect and ignore the existing file?
script Code:
// Trigger: "A Download Stopped" disablePermissionChecks(); { link.setName(link.getProperty("LINKDUPEID") + " - " + link.getProperty("FINAL_FILENAME")); link.setComment(link.getProperty("picturedirectlink")); }
Spoiler:
url used for test: **External links are only visible to Support Staff****External links are only visible to Support Staff** logs: 03.04.18 10.18.57 <--> 03.04.18 10.33.35 jdlog://8805654433151/ error details jd.plugins.FileExistsException: Creating file C:\Users\Disaeon\Desktop\tst\_x3\392220242_00\album392220242_00_392220242_456239144 - XcPSjYTp12c.jpg failed. C:\Users\Disaeon\Desktop\tst\_x3\392220242_00\album392220242_00_392220242_456239144 - XcPSjYTp12c.jpg already exists. at jd.plugins.PluginForHost.renameOrMove(PluginForHost.java:2278) at jd.plugins.PluginForHost.handle(PluginForHost.java:2272) at jd.plugins.PluginForHost.move(PluginForHost.java:2230) at jd.controlling.downloadcontroller.DownloadWatchDog.move(DownloadWatchDog.java:4519) at jd.controlling.downloadcontroller.DownloadWatchDog$41.execute(DownloadWatchDog.java:4399) at jd.controlling.downloadcontroller.DownloadWatchDog$34.processJobs(DownloadWatchDog.java:3241) at jd.controlling.downloadcontroller.DownloadWatchDog$34.run(DownloadWatchDog.java:3622) [/CODE] If it is a very complicated thing, like needing to update in the core, you can disconsider because I am only using this temporarily. Note: I'm using "LINKDUPEID" because it's easy to remove album information at the beginning of the name (album392220242_00_), when functionality is available. Last edited by patriks; 03.04.2018 at 16:58. |
#403
|
|||
|
|||
You can use
Code:
var myBoolean = myFilePath.exists(); Code:
var myBoolean = myDownloadLink.remove(); Code:
myDownloadLink.setEnabled(true); Hope I have understood your problem correctly. |
#404
|
||||
|
||||
Quote:
"album392220242_00_392220242_456239144 - XcPSjYTp12c.jpg" link.setName(link.getProperty("LINKDUPEID") + " - " + link.getProperty("FINAL_FILENAME")); but when the downloadlist is cleaned and I make a new download (it checks for new versions), it detects the duplicate file, shows error message and ignores the script, downloading with normal name "XcPSjYTp12c.jpg", generating a duplicate file. I could not use your commands, I do not have much experience with the scripts yet. |
#405
|
|||
|
|||
@patriks: Please contact me in JD Chat. I will be available there for the next 2 hours or so.
|
#406
|
|||
|
|||
Quote:
Following that, I‘ve tried to add the aforementioned Skript to the script Eventer by copying the script to the text field. However, when I try to safe the script, I’m getting an error „Sorry, failed to set the new value“ and the text field turns empty. I’m somewhat frustrated that I cannot get a simple copy and paste job done. Any help is appreciated. Last edited by dariusmk; 11.04.2018 at 06:58. |
#407
|
||||
|
||||
@dariusmk: the script is not meant to be insert directly into Advanced Settings!
It's for the eventscript editor in GUI version. Easiest way would be to setup Eventscripter with JDownloader with GUI and then copy/paste Settings-Advanced Settings-EventScripter.scripts
__________________
JD-Dev & Server-Admin |
#408
|
|||
|
|||
Quote:
As mentioned above, I would like to extract archives only after all downloads have finished. For that purpose the „LinkgrabberSettings: Auto Extraction“ in „Advanced Settings“ must be set to “disabled“. Right? Is there any other setting I need to modify? Last edited by dariusmk; 12.04.2018 at 08:55. |
#409
|
||||
|
||||
Yes, you need to disable default auto extraction in settings
__________________
JD-Dev & Server-Admin |
#410
|
|||
|
|||
Hi, I would need some help for a function that seems not to be included in JD. We also have "don't download the file if it's already in the folder", but I think that would be precious have "don't download the file if it's already in the folder or in a subfolder". That's because you must keep your files in the folder if you want the filter to work: if subfolder are included we could at least organize that folder instread of keep thousands of files of each kind and name. What do you think about this? Thanks
|
#411
|
|||
|
|||
Quote:
The current method limits the number (depth) of sub-folders which can be checked. Please wait for Jiaz to respond regarding request for new API method. @Jiaz: Would it be possible to provide recursive list of the files and folders on the disk, something like: Code:
var myFilePath[] = myFilePath.getChildrenRecursive(); Also can a method similar to "Mark as Finished" menu command be added? |
#412
|
||||
|
||||
@mgpai: no new method required.
Code:
PseudeoCode: function getAllChildrend(path){ var ret=[]; var files=path.getChildren(); for (file:files){ if (file.isFile(){ ret.push(file); }else{ ret.concat(getAllChildren(file)); }} return ret; } var all=getAllChildren(startfolder);
__________________
JD-Dev & Server-Admin |
#413
|
|||
|
|||
@Jiaz: Thanks
Any decision on second request? |
#414
|
|||
|
|||
Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Takhen.js |
#415
|
|||
|
|||
Automatically check channels for new links
Hi,
Jiaz had said that you were very talented scripter and may be able to help... I need a solution that will allow me to add YouTube channels, download links, but then later automatically check those channels to see if there are new links available and then download just the new ones. Thanks for any help! Last edited by Professor S; 14.04.2018 at 21:32. |
#416
|
|||
|
|||
hI:)
I found the example event to restart the download if the speed is low. Unfortunately it's not good for me :( I don't want an event that checks the speed of the single file I'm downloading. I need an event that analyzes the TOTAL speed and that if the total speed drops below a threshold (400kbs), it reconnects the router. Can you help me? Thank you |
#417
|
|||
|
|||
Quote:
|
#418
|
|||
|
|||
Quote:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/FlyAway.js |
#419
|
|||
|
|||
Thank you. I’ll check it out.
|
#420
|
|||
|
|||
Quote:
Thanks mgpai. I m not expert, How can I download this file and where should I put it? Or do I have to copy only the text and paste it in a new script? and, last help sorry, is possible add a rule that limits the maximum number of reconnections. Leaving the modem on at night I would not want it to burn edit: I have pasted your code in a new script, I hope I have done well. But it does not work, the router will not restart. I am attaching the screens Last edited by FlyAway; 15.04.2018 at 18:55. |
#421
|
|||
|
|||
Quote:
Quote:
|
#422
|
|||
|
|||
Quote:
Maybe I could better explain my request: I'm not talking only for "search folder and subfolder and skip to download existing files", the general idea was to avoid to donwload duplicates, each method is ok (I said about "search in the folder" because if JD skip downloads by using an "internal memory" of links downloaded, a format of windows could totally unable the skill). However: the general idea is for moving downloaded files. This can be done out from the donwload folder, or can be done in a subfolder if easier to do. Did you said there is a way, no care which one, to do something like this, or you said there is no way? Thanks, sorry for my missunderstanding |
#423
|
|||
|
|||
Quote:
Ok We wait Jiaz...in any case I have only copied and pasted your script without modifying anything and I have checked the item "synchronous execution of the scripts" as specified in the script. And obviously enabled the script. Thanks! |
#424
|
|||
|
|||
Quote:
|
#425
|
|||
|
|||
If you just want to know if it is possible. Yes it is possible. But if you are asking me if I can add it to this script. Sorry I will have to decline.
|
#426
|
|||
|
|||
Quote:
how stupid I am, I had not read that, in the script, there is specified to set "Interval" as Target :( I think that's the problem, I try it tonight and I'll let you know Last edited by FlyAway; 17.04.2018 at 09:15. |
#427
|
|||
|
|||
Quote:
Code:
var h = new Date().getHours(); if (h < 6 || h > 20) return; In this example the script will run only between 6 AM and 9 PM. |
#428
|
|||
|
|||
Quote:
thanks for the help but 6 or 7 hours of reconnections I think disinterrupt the router Do not worry, it's not important. Unfortunately I tried your script having enabled the trigger but it does not work, does not reconnect :( |
#429
|
||||
|
||||
@FlyAway: you should modify script to test it first if reconnect works at all
Does Reconnect work for you? did you setup it first?
__________________
JD-Dev & Server-Admin |
#430
|
|||
|
|||
I do not think I understood. The reconnect function works correctly, it does not work when it is invoked by the script
|
#431
|
||||
|
||||
did you enable Settings-Reconnect -> Reconnects can interrupt resumable downloads?
Not resumeable downloads will block the reconnect. you would need to modify script to stop running downloads first
__________________
JD-Dev & Server-Admin |
#432
|
|||
|
|||
Quote:
I have deleted all list of file in queue, restart JD2 and seem to be working. This night I test it. Any idea for limit of number of reconnection? Last edited by FlyAway; 17.04.2018 at 13:48. |
#433
|
||||
|
||||
You can modify script to check global map of reconnects done and add an additional script that always increases when reconnect is started 'Before A Reconnect' and 'After A Reconnect'. Better ask mgpai for help with this
__________________
JD-Dev & Server-Admin |
#434
|
|||
|
|||
I'm trying it, it seems to work, many many thanks
|
#435
|
|||
|
|||
Quote:
I hope that, in the future, someone can run this script because you can assign a number of executions of your choice, it could be useful in many cases |
#436
|
||||
|
||||
@FlyAway: what exactly do you need this *number of executions* ?
__________________
JD-Dev & Server-Admin |
#437
|
|||
|
|||
I have to limit the number of reconnections because I leave the router on at night and, using the mgpai scipt, is likely to burn if it continues to reconnect for many hours
|
#438
|
||||
|
||||
you can easily modify to check last reconnect timestamp in your script
for example store timestamp last time you requested reconnect and only allow script when last reconnect is more than x mins/hours ago. should be easy to modify for mgpai
__________________
JD-Dev & Server-Admin |
#439
|
|||
|
|||
sorry I was not clear. Can you read my previous posts? There I explained well what the problem is. I think your solution is not good
Last edited by FlyAway; 18.04.2018 at 19:50. |
#440
|
||||
|
||||
@FlyAway: Limiting the execution is about the same result as only allowing for example 2 reconnects per hour. Because with limited executions, you have to reset it manually while my solution just prevents endless/too many reconnects. You could easily mix time check and time interval check. For example between 22:00 and 06:00 only allow 2 reconnects per hours
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|