JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #401  
Old 31.03.2018, 11:45
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 348
Default

Quote:
Originally Posted by Biohazmatz View Post
... When ... archive extraction has started, I want the downloading to be paused/stopped ...
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Biohazmatz.js
Reply With Quote
  #402  
Old 03.04.2018, 16:46
patriks patriks is offline
Vacuum Cleaner
 
Join Date: Aug 2017
Location: Brasil
Posts: 15
Default

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"));
}
I reproduced the error in a test and created a log:
Spoiler:


url used for test: **External links are only visible to Supporters****External links are only visible to Supporters**

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.
Reply With Quote
  #403  
Old 03.04.2018, 17:13
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 348
Default

You can use
Code:
var myBoolean = myFilePath.exists();
to check if the file exists on disk and then use
Code:
var myBoolean = myDownloadLink.remove();
to remove it, or use
Code:
myDownloadLink.setEnabled(true);
to disable it.

Hope I have understood your problem correctly.
Reply With Quote
  #404  
Old 03.04.2018, 18:29
patriks patriks is offline
Vacuum Cleaner
 
Join Date: Aug 2017
Location: Brasil
Posts: 15
Default

Quote:
Originally Posted by mgpai View Post
You can use
Code:
var myBoolean = myFilePath.exists();
to check if the file exists on disk and then use
Code:
var myBoolean = myDownloadLink.remove();
to remove it, or use
Code:
myDownloadLink.setEnabled(true);
to disable it.

Hope I have understood your problem correctly.
The script renames the file "XcPSjYTp12c.jpg" to
"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.
Reply With Quote
  #405  
Old 03.04.2018, 18:44
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 348
Default

@patriks: Please contact me in JD Chat. I will be available there for the next 2 hours or so.
Reply With Quote
  #406  
Old 10.04.2018, 22:42
dariusmk dariusmk is offline
JD Beta
 
Join Date: Aug 2011
Posts: 51
Default

Quote:
Originally Posted by mgpai View Post
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

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.
As advised, I’ve disabled the setting „LinkgrabberSettings: Auto Extraction“ in „Advanced Settings“.

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.
Reply With Quote
  #407  
Old 11.04.2018, 11:46
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 58,940
Default

@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
Reply With Quote
  #408  
Old 12.04.2018, 08:35
dariusmk dariusmk is offline
JD Beta
 
Join Date: Aug 2011
Posts: 51
Default

Quote:
Originally Posted by Jiaz View Post
@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
Thanks. Will try.

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.
Reply With Quote
  #409  
Old 12.04.2018, 10:20
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 58,940
Default

Yes, you need to disable default auto extraction in settings
__________________
JD-Dev & Server-Admin
Reply With Quote
  #410  
Old 13.04.2018, 16:19
Takhen Takhen is offline
Baby Loader
 
Join Date: Mar 2018
Posts: 9
Default

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
Reply With Quote
  #411  
Old 13.04.2018, 17:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 348
Default

Quote:
Originally Posted by Takhen View Post
... "don't download the file if it's already in the folder or in a subfolder"...
While it is possible to detect if the exists on disk, it is not possible to extend the GUI functionality of 'skip file if exists' to the event scripter. The links can only be disabled/removed or temporarily skipped to prevent it from being downloaded.

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?
Reply With Quote
  #412  
Old 13.04.2018, 19:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 58,940
Default

@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
Reply With Quote
  #413  
Old 14.04.2018, 06:49
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 348
Default

@Jiaz: Thanks

Quote:
Originally Posted by mgpai View Post
Also can a method similar to "Mark as Finished" menu command be added?
Any decision on second request?
Reply With Quote
  #414  
Old 14.04.2018, 06:51
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 348
Default

Quote:
Originally Posted by Takhen View Post
... "don't download the file if it's already in the folder or in a subfolder"...
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Takhen.js
Reply With Quote
  #415  
Old 14.04.2018, 21:30
Professor S Professor S is offline
Modem User
 
Join Date: Apr 2018
Posts: 2
Exclamation 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.
Reply With Quote
  #416  
Old 15.04.2018, 01:42
FlyAway FlyAway is offline
DSL User
 
Join Date: Feb 2013
Posts: 39
Default

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
Reply With Quote
  #417  
Old 15.04.2018, 06:42
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 348
Default

Quote:
Originally Posted by Professor S View Post
... 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 ...
There is a basic script which can check channels, but it is does not detect any duplicate links. I would suggest you take a look at full fledged RSS readers like flexget (there are examples on the forum on how to integrate it with JD). You will also be able to filter content based on keyword, URL etc.
Reply With Quote
  #418  
Old 15.04.2018, 06:47
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 348
Default

Quote:
Originally Posted by FlyAway View Post
... I need an event that analyzes the TOTAL speed and that if the total speed drops below a threshold (400kbs), it reconnects the router ...
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/FlyAway.js
Reply With Quote
  #419  
Old 15.04.2018, 10:09
Professor S Professor S is offline
Modem User
 
Join Date: Apr 2018
Posts: 2
Default

Thank you. I’ll check it out.
Reply With Quote
  #420  
Old 15.04.2018, 11:27
FlyAway FlyAway is offline
DSL User
 
Join Date: Feb 2013
Posts: 39
Default

Quote:
Originally Posted by mgpai View Post
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/FlyAway.js

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
Attached Thumbnails
Immagiiune.jpg   Immagine.jpg  

Last edited by FlyAway; 15.04.2018 at 18:55.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 11:55.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.