JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 08.07.2015, 14:22
superuser
Guest
 
Posts: n/a
Default AutoUpdate while reconnect

Hi,

i'd like to suggest a feature:

JD2 could do an automatic update, before reconnecting, because all DLs are stopped at this moment ...

Regards
su
Reply With Quote
  #2  
Old 08.07.2015, 14:25
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,044
Default

Indeed that is a nice idea!
Ticket:


GreeZ 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
  #3  
Old 08.07.2015, 14:39
superuser
Guest
 
Posts: n/a
Default

Thx for opening a ticket!
Reply With Quote
  #4  
Old 18.08.2015, 16:44
bobolecoco bobolecoco is offline
Super Loader
 
Join Date: Aug 2015
Location: France
Posts: 27
Default

Could be nice if we also had a function like "if a new update is available and no download running, then autoupdate/restart JDownloader"...
Reply With Quote
  #5  
Old 19.08.2015, 10:04
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,234
Default

Updates are already installed in background if possible. For example plugin updates no longer need a restart of JDownloader. Only Core updates do and they are downloaded/collected and installed on next close/start of JDownloader.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 19.08.2015, 10:38
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,529
Default

Can't we use scripts to do it?

Restart and update JD before reconnect (using "Before a Reconnect" as trigger):
Code:
// Check if updates are availiable
if (callAPI("update", "isUpdateAvailable")) {
    // Restart JD and update
    callAPI("update", "restartAndUpdate");
}
Restart and update JD when downloads are not running (using "interval" as trigger)
Code:
// Check if updates are availaible when JD is idle
if (callAPI("update", "isUpdateAvailable") && isDownloadControllerIdle()) {
    // Restart JD and Update
    callAPI("update", "restartAndUpdate")
}
Reply With Quote
  #7  
Old 19.08.2015, 10:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,234
Default

Nope, that wont work. An Update needs a restart of JDownloader and internet connection (to verify update). So after update JDownloader no longer knows to reconnect
After a reconnect it could work
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 19.08.2015, 11:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,529
Default

Because a reconnect has not been performed (as the trigger is before a reconnect), internet connection will be available for JD to restart and update (I have tested this).

The conditions which triggered a reconnect before the restart, would still be present after the restart. So a reconnect should be triggered again (I could not verify this as I do not have conditions which could trigger a reconnect). Only this time, even if the script is triggered, because there are no updates, JD would not require a restart and hence reconnect will be performed without any interruption ... or am I wrong in thinking it is so?

I hope someone who uses reconnect could test this and give the feedback.
Reply With Quote
  #9  
Old 19.08.2015, 12:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,234
Default

Yes, did not thought about this
But then you should do it after Reconnect to avoid enter captcha just to get another reconnect
__________________
JD-Dev & Server-Admin
Reply With Quote
  #10  
Old 11.12.2016, 15:54
DAC324 DAC324 is offline
Wind Gust
 
Join Date: Nov 2015
Posts: 44
Default

Hello,

it is a pity that this great idea is apparently not being taken into account any more. Indeed, a script could do the job (in my opinion).

Pseudo language:
Code:
if (reconnect)
{
    if (update_available)
    { 
       write_environment ("reconnect", "Yes")
       do_update()
       restart_jD()
 }
}
Upon jDownloader's restart:
Code:
if check_environment ("reconnect")
{
    do_reconnect()
}
That means if jDownloader detects that updates are available once it is ready for doing a reconnect, it should write the information that a reconnect is required into some environment variable or config file.
Afterwards (without having done the reconnect so far) the update including restart could be performed.
Upon restart, jDownloader then checks if a reconnect is pending. If yes, it does it before starting the downloads.

Unfortunately, I am not that much familiar with jDownloader's script feature to determine if that is a reasonable approach.

Thank you very much and kind regards,

DAC324
Reply With Quote
  #11  
Old 12.12.2016, 15:31
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,234
Default

@DAC324: you can ask mgpai (in english) for help to make your script working.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #12  
Old 12.12.2016, 15:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,234
Default

Quote:
Originally Posted by Jiaz View Post
After a reconnect it could work
In case we add official support for it, we first would do the reconnect and then restart JDownloader. The other way around we would have to store the information (reconnect required).
__________________
JD-Dev & Server-Admin
Reply With Quote
  #13  
Old 12.12.2016, 16:32
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,529
Default

Quote:
Originally Posted by mgpai View Post
Code:
// Check if updates are availiable
if (callAPI("update", "isUpdateAvailable")) {
    // Restart JD and update
    callAPI("update", "restartAndUpdate");
}
@DAC324,
Use the above script with "Before a Reconnect" trigger. Since the external IP would still remain the same after the restart, a "Reconnect" should be triggered automatically when the downloads starts again.
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:02.
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.