JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #2721  
Old 26.11.2023, 19:33
JKA JKA is offline
Junior Loader
 
Join Date: Nov 2023
Posts: 12
Default

Quote:
Originally Posted by FBD View Post
Ändere
Code:
for (var i = 0; i < 3; i++) {
zu
Code:
for (var i = 0; i < 2; i++) {
und
Code:
if (trigger == 3) {
zu
Code:
if (trigger == 2) {
Dazu könnte man dann das Interval fürs script auch etwas herabsetzen, das aber nicht zu knapp machen, der reconnect dauert ja auch noch etwas.
so auf 250.000 von 300.000? oder geht niedriger wie 220.000?
Reply With Quote
  #2722  
Old 26.11.2023, 19:48
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by JKA View Post
so auf 250.000 von 300.000? oder geht niedriger wie 220.000?
Interval ist in Millisekunden, 300.000 sind also 5 Minuten. Wenn das Script 2 Minuten lang die Downloadgeschwindigkeit testet - und dann eventuell den reconnect triggert - dann sollte das Interval noch etwas darüber liegen.JDownloader - und auch das script - wissen nicht wie lang der reconnect dauert. Das variiert ja auch. Also besser etwas Wartezeit einplanen. Technisch gesehen ist der Minimalwert

2 Minuten + Reconnect-Zeit + Zeit-bis-Downloads-laufen.

Wenn das Interval zu kurz ist, wird noch ein reconnect ausgeführt bevor deine Downloads wieder anlaufen können.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #2723  
Old 26.11.2023, 20:02
JKA JKA is offline
Junior Loader
 
Join Date: Nov 2023
Posts: 12
Default

Quote:
Originally Posted by FBD View Post
Interval ist in Millisekunden, 300.000 sind also 5 Minuten. Wenn das Script 2 Minuten lang die Downloadgeschwindigkeit testet - und dann eventuell den reconnect triggert - dann sollte das Interval noch etwas darüber liegen.JDownloader - und auch das script - wissen nicht wie lang der reconnect dauert. Das variiert ja auch. Also besser etwas Wartezeit einplanen. Technisch gesehen ist der Minimalwert

2 Minuten + Reconnect-Zeit + Zeit-bis-Downloads-laufen.

Wenn das Interval zu kurz ist, wird noch ein reconnect ausgeführt bevor deine Downloads wieder anlaufen können.

ooooh okay, verstehe. Vielen lieben Dank für die Erklärung!
Du bist der Beste <3
Reply With Quote
  #2724  
Old 26.11.2023, 20:46
JKA JKA is offline
Junior Loader
 
Join Date: Nov 2023
Posts: 12
Default

Wäre es möglich per event-script jdownloader2 neuzustarten wenn ein host als status "Error 503" ausspuckt?
Reply With Quote
  #2725  
Old 26.11.2023, 20:57
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by JKA View Post
Wäre es möglich per event-script jdownloader2 neuzustarten wenn ein host als status "Error 503" ausspuckt?
Warum direkt jDownloader neustarten? Den link zurücksetzen sollte doch genügen.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #2726  
Old 26.11.2023, 20:57
JustARandomDude JustARandomDude is offline
Modem User
 
Join Date: Nov 2023
Posts: 2
Default

Quote:
Originally Posted by FBD View Post
Code:
var extractedFilePaths = myArchive.getExtractedFilePaths();
The [ ] in the script help screen are just to indicate that the return value is an array, you're not supposed to have them in your program.
Thanks
Reply With Quote
  #2727  
Old 26.11.2023, 21:05
JKA JKA is offline
Junior Loader
 
Join Date: Nov 2023
Posts: 12
Default

Quote:
Originally Posted by FBD View Post
Warum direkt jDownloader neustarten? Den link zurücksetzen sollte doch genügen.

oooh, klasse idee! ja du hast absolut recht!
link zurücksetzen bei error 503 nach reconnect per script?
Reply With Quote
  #2728  
Old 26.11.2023, 21:18
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by JKA View Post
oooh, klasse idee! ja du hast absolut recht!
link zurücksetzen bei error 503 nach reconnect per script?
Älteres script was das erledigen sollte:

Code:
// Handle download errors
// Trigger Required: Interval

var links = getAllDownloadLinks();

for (i = 0; i < links.length; i++) {
    var link = links[i];
    
    // Status needs to be EXACTLY what's shown in your Status column!
    // Case sensitive!
    if (link.getStatus() == "Server Error 503") {
        // Reset the download (WARNING: Will discard already downloaded data)
        link.reset();

        // Start downloads in case all downloads finished
        // startDownloads();
    }
}
Am besten ein mal testen und das script manuell starten wenn du einen link mit dem error hast. Wenn es klappt, dann kannst du es per Interval automatisch laufen lassen, ein mal pro Minute sollte oft genug sein.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader

Last edited by FBD; 26.11.2023 at 23:50. Reason: Script updated
Reply With Quote
  #2729  
Old 26.11.2023, 21:45
JKA JKA is offline
Junior Loader
 
Join Date: Nov 2023
Posts: 12
Default

Leider bisher kein glück damit.
Reagiert nicht auf status server error 503
Reply With Quote
  #2730  
Old 26.11.2023, 21:58
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by JKA View Post
Leider bisher kein glück damit.
Reagiert nicht auf status server error 503
Dann hat der link einen Status der nicht im Script gehandled wird. Wenn ein Link bei dir den Error hat, starte mal dieses script:

Code:
var links = getAllDownloadLinks();
var report = [];

for (i = 0; i < links.length; i++) {
    var link = links[i];
    report.push(link.getName() + " - " + link.getFinalLinkStatus() + " - " + link.getStatus());
}

setAdvancedAlert(true);
alert(report.join("\n"));
Du bekommst dann eine Liste mit allen Links in deiner Download-Liste mit deren Status. Dann kannst du sehen welcher Status dein Error 503 link hat.

BTW: Kannst auch in den Support-Chat kommen, da gehts schneller als hier per Forum Posts.

Edit: Hab das Script oben mal abgeändert damit es sich einfach auf die Status Spalte bezieht. Im Script muss aber EXAKT der gleiche String stehen wie dann im jDownloader angezeigt wird: ("Server Error 503"). Also auch mit Gross/Kleinschreibung und Leerzeichen etc.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader

Last edited by FBD; 26.11.2023 at 23:55.
Reply With Quote
  #2731  
Old 27.11.2023, 07:43
hackmonker hackmonker is offline
Modem User
 
Join Date: Mar 2023
Posts: 4
Default

Code:
var myPackage = package;
if (myPackage.isFinished() == true) {
    var downloadFolder = myPackage.getDownloadFolder();
    var destFolder = downloadFolder.split("/output/Temp").join("/output/Completed")

    if (destFolder != downloadFolder) {
        getPath(downloadFolder).moveTo(destFolder);
    }
}
i am using the above script in event scripter to move downloaded packages to a desired folder with trigger set to "Package finished". The archive extractor is also enabled with option to delete archives after extraction. The issue with my script is that it immediately moves the archive as soon as the download completes without letting jd2 extract and delete the archive. Can someone help me fix it ? The order should be -
1) Package Download completes & event scripter is now triggered
2) Wait for jd2 to Extract and Delete archive if package downloaded is a archive
3) Move to the desired folder

Last edited by hackmonker; 27.11.2023 at 08:09. Reason: just fixing the spacing in code
Reply With Quote
  #2732  
Old 27.11.2023, 10:32
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by hackmonker View Post
Can someone help me fix it ? The order should be -
1) Package Download completes & event scripter is now triggered
2) Wait for jd2 to Extract and Delete archive if package downloaded is a archive
3) Move to the desired folder
Your problem is that your script is triggered on "Package finished" which is called *before* archive extraction. You have to change the script to use the "Archive extraction finished" trigger and also adjust your script to use the appropriate "getExtractToFolder()" function to move the extracted files. There are scripts for that in this thread already.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #2733  
Old 27.11.2023, 12:07
hackmonker hackmonker is offline
Modem User
 
Join Date: Mar 2023
Posts: 4
Default

Quote:
Originally Posted by FBD View Post
Your problem is that your script is triggered on "Package finished" which is called *before* archive extraction. You have to change the script to use the "Archive extraction finished" trigger and also adjust your script to use the appropriate "getExtractToFolder()" function to move the extracted files. There are scripts for that in this thread already.

What if say i have 2 scripts. One which triggers at package finished, checks if its a archive, if it is does nothing, else moves the non archive package to desired folder
Another script which triggers at finished extracting, and simply moves the extracted archive to desired folder. Which method will you recommend ?
Reply With Quote
  #2734  
Old 27.11.2023, 12:31
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by hackmonker View Post
What if say i have 2 scripts. One which triggers at package finished, checks if its a archive, if it is does nothing, else moves the non archive package to desired folder
Another script which triggers at finished extracting, and simply moves the extracted archive to desired folder. Which method will you recommend ?
If you want *both* packagesto be moved to your "Completed" folder, you would need 2 scripts, just as you described. One that triggers on package finished, ignoring archives and another one running after extraction moving the extracted files.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #2735  
Old 28.11.2023, 01:11
Coldblackice Coldblackice is offline
DSL User
 
Join Date: Sep 2019
Location: San Francisco
Posts: 38
Default

I use JDownloader to regularly download a Github repo's latest nightly release. The link uses the same link/filename, so I merely re-copy/paste the link into JD and override it being a duplicate. Would anyone know how to automate JD to:
  1. Automatically re-download the file daily (**External links are only visible to Support Staff****External links are only visible to Support Staff**)
  2. Do a hash-check to determine if the downloaded file was changed (which would mean it's a new release)

Perhaps #2 would be too difficult for JD to accomplish, which is fine. My primary need is auto-scheduling JD to redownload the same URL daily.

I've searched this thread for already-existing scripts but since the search terms are used in so many other script requests, I can't find scripts with similar functionality that I could start off with and edit. If anyone knows of links to any, I'd appreciate that, too!

TIA
Reply With Quote
  #2736  
Old 28.11.2023, 11:57
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,683
Default

@Coldblackice
To be honest if you're just always downloading that one direct link I'd recommend simply writing a custom script that does this instead of using JDownloader.
It will take more time to make JDownloader do this than it takes to write a separate script which can only do this one job.
__________________
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
  #2737  
Old 28.11.2023, 16:49
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

Quote:
Originally Posted by Coldblackice View Post
I use JDownloader to regularly download a Github repo's latest nightly release. The link uses the same link/filename, so I merely re-copy/paste the link into JD and override it being a duplicate. Would anyone know how to automate JD to:
There are already scripts in this thread that periodically add a url to jdownloader like this one for example:

https://board.jdownloader.org/showpo...&postcount=122

But as pspzockerscene said that's surely not the ideal way to do it. You are aware that GitHub is basically a system that automates what you want to do by design? Just check out the GitHub nightly repo. And if you want it to update just let git do the update, triggered by you or automatically by a script. Git will then only download the updates and not the full repo every time. That's basically what git was written for.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #2738  
Old 28.11.2023, 17:11
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,683
Default

@FBD
You can't see the link he posted so you couldn't know but:
No he can't just use the git command in this case because he is trying to download a [compiled] release of a repo - the URL looks similar to this one:
Code:
htgithub.com/bla/bla/releases/download/nightly-build/bla-windows-x86-blabla.zip
__________________
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
  #2739  
Old 28.11.2023, 17:31
FBD's Avatar
FBD FBD is offline
Mega Loader
 
Join Date: Nov 2018
Location: https://web.libera.chat/#jDownloader
Posts: 65
Default

@pspzockerscene
Ah i see, yeah makes sense. Well he can try with the script from mgpai then, should mostly do what he wants.
__________________
irc.libera.chat #jDownloader web.libera.chat/#jDownloader
Reply With Quote
  #2740  
Old 28.11.2023, 17:38
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,683
Default

Yap though to be honest if I'd want to do the same I'd do it without JDownloader.
__________________
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
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 05: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 - 2024, Jelsoft Enterprises Ltd.