JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 08.07.2021, 16:17
guardao's Avatar
guardao guardao is offline
JD-Team
 
Join Date: Mar 2009
Posts: 603
Default UPDATE SCRIPT does not work

The JD Update SCRIPT is no longer working. (#CORE 44633)
Please fix it.
TX
___________________________________________________________

/*
Update when JD is Idle
Trigger Required: "Interval" (Recommended: 600000 (10 mins.) or more)
*/

if (
callAPI("update", "isUpdateAvailable") &&
!callAPI("linkcrawler", "isCrawling") &&
!callAPI("linkgrabberv2", "isCollecting") &&
!callAPI("extraction", "getQueue").length &&
isDownloadControllerIdle()
) {
callAPI("update", "restartAndUpdate");
}
Reply With Quote
  #2  
Old 08.07.2021, 16:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

what exactly doesn't work? just tested and working fine
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 08.07.2021, 16:27
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,334
Default

@guardao: Seems to be working fine (same core revision). Are you getting any errors?

P.S.: @Jiaz was faster.
Reply With Quote
  #4  
Old 08.07.2021, 17:18
guardao's Avatar
guardao guardao is offline
JD-Team
 
Join Date: Mar 2009
Posts: 603
Default

Quote:
Originally Posted by mgpai View Post
@guardao: Seems to be working fine (same core revision). Are you getting any errors?

P.S.: @Jiaz was faster.
I had to manually update more than once, but it looks like everything is fine now.
Thanks guys.

Last edited by guardao; 08.07.2021 at 17:27.
Reply With Quote
  #5  
Old 09.07.2021, 10:01
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 59,235
Default

I'm using this for over 1,5 years now and never had to update my headless JD manually once
__________________
JD Supporter, Plugin Dev. & Community Manager
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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #6  
Old 15.07.2021, 16:49
guardao's Avatar
guardao guardao is offline
JD-Team
 
Join Date: Mar 2009
Posts: 603
Default

Quote:
Originally Posted by guardao View Post
The JD Update SCRIPT is no longer working. (#CORE 44633)
Please fix it.
TX
___________________________________________________________

/*
Update when JD is Idle
Trigger Required: "Interval" (Recommended: 600000 (10 mins.) or more)
*/

if (
callAPI("update", "isUpdateAvailable") &&
!callAPI("linkcrawler", "isCrawling") &&
!callAPI("linkgrabberv2", "isCollecting") &&
!callAPI("extraction", "getQueue").length &&
isDownloadControllerIdle()
) {
callAPI("update", "restartAndUpdate");
}
Sorry guys, I add to update MANUALLY today.

After the JD START I was asked to update.


15.07.21 15.35.40 <--> 15.07.21 15.43.14 jdlog://1094825302851/

Last edited by guardao; 15.07.2021 at 16:52.
Reply With Quote
  #7  
Old 15.07.2021, 17:34
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

@guardao: the script runs every 10 mins. Updates are downloaded in background and this script will only be triggered if JDownloader has the update ready to install and no downlods/nothing crawling/nothing extracting and in idle
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 24.07.2021, 01:28
guardao's Avatar
guardao guardao is offline
JD-Team
 
Join Date: Mar 2009
Posts: 603
Default UPATE SCRIPT - Improvement

Quote:
Originally Posted by Jiaz View Post
@guardao: the script runs every 10 mins. Updates are downloaded in background and this script will only be triggered if JDownloader has the update ready to install and no downlods/nothing crawling/nothing extracting and in idle
When JD does a FRESH START, if there are new updates, this script doesn't do it automatically, instead it shows the normal update warning - "Updates available!" - and a manual restart is required for the update to be implemented.

Perhaps the script can handle this silently, without the need for a new restart.

See PIC.

**External links are only visible to Support Staff****External links are only visible to Support Staff**
Reply With Quote
  #9  
Old 24.07.2021, 04:47
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,372
Default

its because the trigger is after x seconds, its technically I would not classify this as a bug of the script. I personally think on application start, jd should check for core updates again and dl & install (optional) within advanced settings.

alternatively to 'fix' this you would need an additional script to run after start 'JDownloader started', and re-run the same script.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #10  
Old 26.07.2021, 12:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

@guardo: The script is triggered every 10 mins. Auto update check is triggered every 5 mins. you are free to change the interval timings to your needs
__________________
JD-Dev & Server-Admin

Last edited by guardao; 26.07.2021 at 13:05.
Reply With Quote
  #11  
Old 26.07.2021, 13:05
guardao's Avatar
guardao guardao is offline
JD-Team
 
Join Date: Mar 2009
Posts: 603
Default

Quote:
Originally Posted by Jiaz View Post
@guardo: The script is triggered every 10 mins. Auto update check is triggered every 5 mins. you are free to change the interval timings to your needs
There is not the point here. This concern about the JD START.

The script - "its because the trigger is after x seconds..." - "...to 'fix' this you would need an additional script to run after start 'JDownloader started', and re-run the same script. " - as RAZTOKI wrote.
Reply With Quote
  #12  
Old 26.07.2021, 13:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

@guardo: at JD start, JDownloader doesn't know about pending update. Then the auto update start (I think default 5 minute interval) checks for pending updates and changes the flag. The eventscripter script now sees pending update and can react.
If you want for shorter waiting time, then just update your timings
__________________
JD-Dev & Server-Admin
Reply With Quote
  #13  
Old 26.07.2021, 13:48
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,334
Default

@guardao: If an update is available, the script will automatically update and restart JD when it is idle, without any user interaction. If an update is available on startup, the script will install and restart JD, if it is idle during the next check (once every 10 minutes).

If you want to always check for updates on startup, you can start JD with '-forceupdate' switch.
Reply With Quote
  #14  
Old 26.07.2021, 14:25
guardao's Avatar
guardao guardao is offline
JD-Team
 
Join Date: Mar 2009
Posts: 603
Default

Quote:
Originally Posted by mgpai View Post
@guardao: If an update is available, the script will automatically update and restart JD when it is idle, without any user interaction. If an update is available on startup, the script will install and restart JD, if it is idle during the next check (once every 10 minutes).

If you want to always check for updates on startup, you can start JD with '-forceupdate' switch.
Ok. Where do I find the - "-forceupdate' switch." - ?
Reply With Quote
  #15  
Old 26.07.2021, 14:28
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,531
Default

@guardo: Start JDownloader with -forceupdate commandline parameter
__________________
JD-Dev & Server-Admin
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 09:13.
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 - 2021, Jelsoft Enterprises Ltd.