JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #2101  
Old 16.02.2022, 13:32
mirror51 mirror51 is offline
JD Alpha
 
Join Date: Mar 2017
Posts: 21
Default EventScript Trigger for premium filehost

I want to create custom EventScript that if for my premium Filehost example rapidgator.net , my 1Gb quota is left then JD should stop download and disable that premium host.

I read the eventscript docs but not able to find which trigger I need to choose and what options/functions/parameters I have for that API etc
Reply With Quote
  #2102  
Old 16.02.2022, 21:42
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

@namyar
That suggestion might even be a good one as a general feature request.
Especially when a JD is running on a headless device for which you might clear folders without even thinking about space issues it would probably be nice if JD just kept running until enough space is available

-psp-
EDIT

@mirror51
Merged EventScripter threads.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?

Last edited by pspzockerscene; 16.02.2022 at 21:57.
Reply With Quote
  #2103  
Old 16.02.2022, 22:54
namyar namyar is offline
JD Beta
 
Join Date: Apr 2016
Posts: 51
Talking

Quote:
Originally Posted by pspzockerscene View Post
@namyar
That suggestion might even be a good one as a general feature request.
Especially when a JD is running on a headless device for which you might clear folders without even thinking about space issues it would probably be nice if JD just kept running until enough space is available
Yes, initially I had hoped it might be a parameter hidden in advanced settings
I certainly won't complain in case this does end up as a new feature
Reply With Quote
  #2104  
Old 16.02.2022, 22:57
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

I'll re-visit this next time I'm here and ask the team about it.
Although I never really ran in this issue I certainly see room for improvement here

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2105  
Old 16.02.2022, 23:02
namyar namyar is offline
JD Beta
 
Join Date: Apr 2016
Posts: 51
Default

Awesome, thank you for your efforts!
Reply With Quote
  #2106  
Old 17.02.2022, 10:20
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by JDL1059 View Post
... if the file is already highlighted red (i.e. already been downloaded), it can skip downloading it?
  • Use the the original script to monitor urls and fetch/add links.
  • Use a packagizer rule to send only the 'unqiue' links to download list and start downloaing them as well.

Alternatively, you can a create a linkfilter rule to prevent duplicate links from even being added to JD.
Reply With Quote
  #2107  
Old 17.02.2022, 11:45
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by K14M View Post
Is there a script that can check given links for new files and download them?
Related post: #2106
Reply With Quote
  #2108  
Old 17.02.2022, 12:17
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Tobi573 View Post
How is the "force start" command?
Quote:
Originally Posted by gentle View Post
Maybe the "PLUGIN_DEFECT" must be replaced with "ERROR_PLUGIN_DEFECT", but these 2 variants also didnt work for me...
A 'force' download may not be required. Just the 'resume' call should be enough (Not tested).

Code:
/*
    Resume links
    Trigger : Interval (Reommended 60000+)
*/

var list = ["PLUGIN_DEFECT", "OTHER_ERROR"];

getAllDownloadLinks().forEach(function(link) {
    if (list.indexOf(link.finalLinkStatus) > -1) {
        link.resume();
    }
})

Use the following script to get a list of link status, select and press CTRL+C to copy the relevant status to clipboard and add it in the main script.

Code:
/*
    Get list of final link status
    Trigger: None (Use test run to execute the script)
*/

setAdvancedAlert(true);

var list = [];

getAllDownloadLinks().forEach(function(link) {
    var status = link.finalLinkStatus;
    list.indexOf(status) == -1 && list.push(status);
})

alert(list.join("\n"));
Reply With Quote
  #2109  
Old 17.02.2022, 13:12
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by namyar View Post
sometimes links are flagged as "insufficient space". I'd like to retry such links after a certain time
Code:
/*
    Resume links
    Trigger : Interval (Recmmended 600000+)
*/

var start = isDownloadControllerRunning();

getAllDownloadLinks().forEach(function(link) {
    link.skippedReason == "DISK_FULL" && (link.skipped = false);
    !start && (start = true);
})

start && !isDownloadControllerRunning() && startDownloads();
Reply With Quote
  #2110  
Old 17.02.2022, 13:16
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by mirror51 View Post
I read the eventscript docs but not able to find which trigger I need to choose and what options/functions/parameters I have for that API etc
The methods available in accountsV2 namespace of myjd API can be used with interval trigger.
Reply With Quote
  #2111  
Old 18.02.2022, 12:32
namyar namyar is offline
JD Beta
 
Join Date: Apr 2016
Posts: 51
Talking

Quote:
Originally Posted by mgpai View Post
Code:
/*
    Resume links
    Trigger : Interval (Recmmended 600000+)
*/

var start = isDownloadControllerRunning();

getAllDownloadLinks().forEach(function(link) {
    link.skippedReason == "DISK_FULL" && (link.skipped = false);
    !start && (start = true);
})

start && !isDownloadControllerRunning() && startDownloads();
Thank you!
Reply With Quote
  #2112  
Old 20.02.2022, 15:26
mirror51 mirror51 is offline
JD Alpha
 
Join Date: Mar 2017
Posts: 21
Default

Anyonme please Help.
I want that if the file status is Not enough traffic available more than 5 times
Then JD stops all downloads rather than retrying till eternity
Reply With Quote
  #2113  
Old 20.02.2022, 20:47
JDL1059 JDL1059 is offline
Junior Loader
 
Join Date: Oct 2021
Posts: 10
Default

Quote:
Originally Posted by mgpai View Post
  • Use the the **External links are only visible to Support Staff**... to monitor urls and fetch/add links.
  • Use a packagizer rule to send only the 'unqiue' links to download list and start downloaing them as well.

Alternatively, you can a create a linkfilter rule to prevent duplicate links from even being added to JD.
thank you. What is packagizer rules / how do I set it up to work alongside the first script?
Reply With Quote
  #2114  
Old 21.02.2022, 15:20
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

Quote:
Originally Posted by JDL1059 View Post
What is packagizer rules
A google search (1 second) would have lead you to this support article (first google search result).
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2115  
Old 21.02.2022, 19:03
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

@namyar
I've created a ticket for your request:


I won't promise anything.
First I'll wait for the opinion of developer Jiaz.
After all this is something you could easily do via EventScripter and I guess the issue of frequently not having enough storage available is not too common.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2116  
Old 02.03.2022, 10:25
armin.beispiel armin.beispiel is offline
Vacuum Cleaner
 
Join Date: Nov 2015
Posts: 19
Default Synchronous doReconnect()

I have many links to a hoster that lets me solve a captcha before JD can realize that it needs a reconnect. So, to reduce the amount of captchas by half, I want to do a reconnect after every finishing of a download. I created the following script for the trigger "Download stopped":

Code:
if (link.isFinished()) {
    doReconnect();
}
However, when the script is executed asynchronously (with checkbox in script editing dialog), only every second file is downloaded and the ones in between show the message "Hoster problem?".

When the script is executed synchronously instead, the downloads effectively stop (list looks like that without anything going on), the toolbar play icon is still disabled, the reconnect icon in the status bar isn't active and pressing the toolbar stop button accomplishes nothing. (I gave it time.) I have to restart JD to get it working again.

Synchronous execution seems like the best solution, so no download is started only shortly, followed by abortion by a reconnect. But this first needs to be made functional.

BTW: I have configured JD to run a batch file to reconnect.
Reply With Quote
  #2117  
Old 02.03.2022, 11:58
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

Quote:
Originally Posted by armin.beispiel View Post
I have many links to a hoster that lets me solve a captcha before JD can realize that it needs a reconnect
Which host is that?
For most of all of such hosts, we've already implemented a workaround.
Check if you find a related setting in Settings -> Plugins -> [hosterDomain]

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2118  
Old 02.03.2022, 13:04
armin.beispiel armin.beispiel is offline
Vacuum Cleaner
 
Join Date: Nov 2015
Posts: 19
Default

Thanks. Hoster is k2s.cc and the workaround checkbox works.

Still, I think the script should work and definitively not make JD unusable until program restart. How about having a means of seeing what scripts are running and to abort them on the script list page? Also doReconnect() should trigger the reconnect animation in the status bar.
Reply With Quote
  #2119  
Old 02.03.2022, 13:30
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

Sorry I'm not really into the EventScripter topic so I won't be able to answer your questions atm.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2120  
Old 03.03.2022, 14:52
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

@armin.beispiel: you cannot use asynchronously execution, as it blocks the DownloadQueue that is required for the execution of the reconnect. The "hoster problem" is a sign that your reconnect does not wait long enough for network to be back again. Your script/reconnect returns but internet not yet fully back again and thus the *hoster problem*. Update your reconnect script/settings for longer wait and then it should not happen anymore. In case you still encounter this issue, please provide a log, see https://support.jdownloader.org/Know...d-session-logs and post logID here

Quote:
Originally Posted by armin.beispiel View Post
Also doReconnect() should trigger the reconnect animation in the status bar.
What reconnect method are you using? the animation should be working just fine when using doReconnect
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 03.03.2022 at 14:54.
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:33.
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 - 2024, Jelsoft Enterprises Ltd.