JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #2061  
Old 27.12.2021, 13:31
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@maxpower420: Both is possible but better wait for mpgai to return here to help you with this. He's our script master and will be able to answer correct/working script faster than me.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2062  
Old 27.12.2021, 16:21
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by maxpower420 View Post
... reset downloads if going below a certain speed ... skip files once a file is certain percentage done ...leave out a hoster completely from the script ...
Code:
/*
    Restart links
    Trigger : Interval (60000+)
*/

var exclude = ["zippyshare.com"];

getRunningDownloadLinks().forEach(function(link) {
    if (
        exclude.indexOf(link.host) == -1 &&
        link.downloadDuration > 60000 &&
        link.speed < 1024 * 128 &&
        link.bytesLoaded / link.bytesTotal < 0.5
    ) {
        link.abort();
    }
})
Reply With Quote
  #2063  
Old 27.12.2021, 17:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@mgpai: nice and easy solution. always thank you for your great work and all the time you spend helping ppl and on scripts
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2064  
Old 28.12.2021, 04:42
maxpower420 maxpower420 is offline
I will play nice!
 
Join Date: Dec 2021
Posts: 2
Default Thanks!

Thanks Mgpai,

Figured would be not to much to it and is even shorter and simpler than i though it would be.

something that prob took all of 5 minutes for you, but would have been hours for my self to figure it out thru trial and error and probably still would be lost.

only had to change one thing which was abort to reset since abort just connects it back to the same slow CDN node. Maybe if there is a way to pause it or skip to the next file to download so it comes back to that file after a few minutes, as i know if i completely exit and start back up jdownloader then it will hit a different CDN node and continue where it left off on the download. where as that miliseconds that it just stops and restarts it on abort, it always connects back to the same slow CDN node.

but is good enough for me !!

Thanks Again
Reply With Quote
  #2065  
Old 28.12.2021, 10:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@maxpower420: what host is the link from? most likely JDownloader will try to reuse existing cached link and that works in time x but will fail after time y.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2066  
Old 29.12.2021, 09:51
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by maxpower420 View Post
... Maybe if there is a way to pause it or skip to the next file to download ...
Code:
/*
    Skip/Unskip link
    Trigger : Interval 
    Recommended Interval : 60000+
*/

var exclude = ["zippyshare.com"];
var skipped = [];

getRunningDownloadLinks().forEach(function(link) {
    if (
        exclude.indexOf(link.host) == -1 &&
        link.downloadDuration > 60000 &&
        link.speed < 1024 * 128
    ) {
        link.skipped = true;
        skipped.push(link);
    }
})

sleep(1000);

skipped.forEach(function(link) {
    link.skipped = false;
})
Reply With Quote
  #2067  
Old 29.12.2021, 19:27
farna1000 farna1000 is offline
Vacuum Cleaner
 
Join Date: Jun 2021
Posts: 16
Default Timeschedule autoreconnect

Hello,
i would like to use auto reconnect function only in the specific time frame (or not use it in a specific time frame) because i dont want auto reconnect during working time.
Please can you help me to do this step by step please?
(i'm not a programmer)
Thank you
Reply With Quote
  #2068  
Old 31.12.2021, 08:05
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by farna1000 View Post
... i would like to use auto reconnect function only in the specific time frame ...
Code:
Settings > Extension Modules > Scheduler
Reply With Quote
  #2069  
Old 31.12.2021, 10:34
farna1000 farna1000 is offline
Vacuum Cleaner
 
Join Date: Jun 2021
Posts: 16
Default

Quote:
Originally Posted by mgpai View Post
Code:
Settings > Extension Modules > Scheduler
Thank you, i check it, but i dont understand how to use it.
Which event? Interval? Where can i set this interval? And which script i have to put it?
Thanks so much
Best regards and happy new year
Reply With Quote
  #2070  
Old 01.01.2022, 01:42
MLi MLi is offline
Mega Loader
 
Join Date: Oct 2010
Posts: 68
Default Merge packages with the same name?

Quote:
Originally Posted by Jiaz View Post
@MLi: You can also do this via Copy Information action (Clipboard, CTRL+C) in rightclick context menu, menu editor. There you can customize the content of the clipboard and what to copy to it
Now that was a useful (and well hidden feature! Thanks a lot, that does everything I needed and more! I now have a little Tampermonkey hack to download takefile files, which is all I needed.

Now for my other question: I have a script that adds downloads to the LinkGrabber, but every time it runs a new package is created instead of adding to the existing ones.

Is there an EventScripter script that can merge packages that have the same name into one? Is that possible to do? If it is, I can try to put it together, but as of right now I know nothing about what the EventScripter can and cannot do...

Thanks!
Reply With Quote
  #2071  
Old 04.01.2022, 13:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@farna1000: In Scheduler extension you add events and tell JDownloader when to do what, eg disable auto reconect daily at x o'clock, and another event enable auto reconnect daily at y o'clock.

@MLi: how do you add the links? what method? clipboard? crawljob files? api?
do you want a custom package name or the auto generated and just want them to be merged?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2072  
Old 07.01.2022, 05:36
MLi MLi is offline
Mega Loader
 
Join Date: Oct 2010
Posts: 68
Default

Quote:
Originally Posted by Jiaz View Post
@MLi: how do you add the links? what method? clipboard? crawljob files? api?
do you want a custom package name or the auto generated and just want them to be merged?
I have my own Tampermonkey-based crawler and a little server for robustness and to prevent double submissions, which adds them to the linkgrabber through the port 9666 flashgot interface. It works very well, I can create different packages for different topics, but every time I run it it creates a new package, so I get several packages with the same name cluttering up the Downloads list.

So I would like to just go through the package list and merge the ones that have the same name, as I know they will have everything else the same.

Is this a use case for the EventScripter? Is there any command list or documentation for it? Anything somewhat similar that I could base it on?

Thanks!

MLi
Reply With Quote
  #2073  
Old 07.01.2022, 16:47
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@MLi: Thanks for the feedback! So you need a feature that when name AND download directory of the package are the same, then the links from linkgrabber will be placed into existing package with same name AND download directory, right? if no such package is found, then create new one?

Would it be okay if this feature is enabled/disabled globally?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2074  
Old 08.01.2022, 15:16
MLi MLi is offline
Mega Loader
 
Join Date: Oct 2010
Posts: 68
Default

Quote:
Originally Posted by Jiaz View Post
@MLi: Thanks for the feedback! So you need a feature that when name AND download directory of the package are the same, then the links from linkgrabber will be placed into existing package with same name AND download directory, right? if no such package is found, then create new one?

Would it be okay if this feature is enabled/disabled globally?
Yup, that is the behavior I need in my case, not sure how many other people would need this, but having it as an option for the linkgrabber for heavy-duty users may be useful.

And having it globally would be fine. In my case I don't automatically add the links to the downloads (sometimes I need to do some filtering before starting them, and the painful part is adding all the links, so that's what I automated), so having it as an option for Start Downloads would also work for me, but either one is fine.

Thanks a lot for all your work on JD, I don't know what I would have done the last couple years without it!

MLi
Reply With Quote
  #2075  
Old 10.01.2022, 18:34
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
Default

@MLi: Thanks for the confirmation about this feature wish. I think this can be done (globally). I will try to work on this as soon as I find time
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2076  
Old 17.01.2022, 22:12
restland restland is offline
I will play nice!
 
Join Date: Jun 2021
Posts: 6
Default check for "509 bandwith limit exceeded"

How to check if my mega downloads get a "509 bandwith limit exceeded"?
I plan to manually reconnect and restart jd when this happens.
Reply With Quote
  #2077  
Old 18.01.2022, 15:40
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

@restland
I wouldn't do this.
Your issue is somewhere else and you should properly fix it, see my answer in your other thread.

-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
  #2078  
Old 21.01.2022, 18:04
Tobi573 Tobi573 is offline
I will play nice!
 
Join Date: Jan 2022
Posts: 4
Default Event Script Hilfe

Hallo vielleicht kann mir jemand helfen.

ich suche ein Script das die Downloads die den Status "Plugin veraltet" , "Plugin defekt" oder "server error" haben, nach einer zeit von 5 min automatisch auf "start erzwingen" macht.


Ich habe ein ähnliches Script hier gefunden das die links zurück setzt. Ich finde aber den command nicht für "Start erzwingen".


// Reset links on Plugin Defect
// Trigger Required: Interval
// CAUTION: Resetting links will discard any data which has already been downloaded

var newInterval = 300000; // Interval between checks (in milliseconds)

if (interval == newInterval) {
var links = getAllDownloadLinks();

for (i = 0; i < links.length; i++) {
var link = links[i];
if (link.getFinalLinkStatus() == "PLUGIN_DEFECT") link.reset();
startDownloads();
}
} else {
interval = newInterval;
}

vielen dank
Reply With Quote
  #2079  
Old 23.01.2022, 20:50
gentle gentle is offline
Super Loader
 
Join Date: Jan 2022
Posts: 26
Default

Hallo,

ich würde sagen laut LOG heißt es nun: "ERROR_PLUGIN_DEFECT"
D.h. der Code müsste schon einmal so aussehen:

// Reset links on Plugin Defect
// Trigger Required: Interval
// CAUTION: Resetting links will discard any data which has already been downloaded

var newInterval = 10000; // Interval between checks (in milliseconds)

if (interval == newInterval) {
var links = getAllDownloadLinks();

for (i = 0; i < links.length; i++) {
var link = links[i];
if (link.getFinalLinkStatus() == "ERROR_PLUGIN_DEFECT") link.reset();
startDownloads();
}
} else {
interval = newInterval;
}
Reply With Quote
  #2080  
Old 23.01.2022, 20:56
gentle gentle is offline
Super Loader
 
Join Date: Jan 2022
Posts: 26
Default

Wenn ich den Code wie von mir einfüge und das Beispiel Script: "Spiele Ton ab, wenn Fertig" aktiviere- höre ich zwar alle 10-15 seks den Ton, aber der Download läuft nicht an...obwohl ich jetzt gerade den Zeitpunkt hatte, dass bei mir gerade wieder Freeslots zur Verfügung standen.
D.h. das Skript funktioniert noch nicht zu 100%
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 12:34.
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.