#1
|
|||
|
|||
JD & OS shutdown (script added)
JD won't always correctly save the download list state when shutting down the computer directly
(whether a file is finished or not) consequence : if one forgets to close JD before shutting down the computer, then on next JD startup some downloads will be considered as not finished whereas the files are full & complete, therefore JD will ask to redownload or ignore those... suggestion : periodic saves of the "download list state" would also be good against OS wide crashes (just in case something else makes the computer crash) suggestion : implementing a save of the "download list state" upon external close command should also be an option as far as my knowledge goes... Thanks for reading. Last edited by whismerhill; 17.08.2011 at 23:18. |
#2
|
||||
|
||||
periodic saves already take place, though I'm unaware of the frequency of this process. JD might need better system shutdown signal detection, which should (quick/force) stop/halt downloads then saves rather than continuing downloading until the OS terminates pid as you will always have a chance of unsaved data (config and even download file(s) to disk).
While system just crashing you cant do much about as no warnings are given..
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#3
|
|||
|
|||
then periodic saves are sometimes either very ineffective, or broken on my computer
because as it happens I had the case where I downloaded some files in a group (about 22 /40 I think) on day 1 on day 2 I start JD & JD continues with file 23 on day 2 JD finishes all 40 downloads (I don't remember if there's something else to download after that, I think there was nothing else but I'm not totally sure) on day 3 I start JD & it asks whether to ignore or redownload file 23 ... and this is not an isolated issue either, it already happened before & will happen again as long as I sometimes forget to shut it down separatly. |
#4
|
||||
|
||||
Maybe setup JD differently if you want a work around ?
look at the addon 'shutdown', this can shut your system down after your queue is finished. Also look at the 'scheduler', you can set stop marks / shutdown based on time over waiting for the queue to finish. This will give you better control over this issue for now waiting for permanent/better solution.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#5
|
|||
|
|||
thanks
I already use that & this is not the same case in those case JD shutdowns the computer by itself once it's done in my case I shutdown/restart the computer now & I just forgot JD was still running (end of day, going to sleep mainly ...) appreciate the help, I was just reporting this, because it's been a lot of versions already that this problem persist, and I just thought that maybe it's not present in the buglist Last edited by whismerhill; 17.08.2011 at 00:47. |
#6
|
||||
|
||||
Sure your welcome, was thinking out loud.
maybe jiaz will comment when he comes into work ;]
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#7
|
|||
|
|||
@whismerhill
When I shut down my computer I look at the the task bar of Windoze. I'll not shut it down as long as there are running tasks. jD saves its link status every 10 minutes. A file that can't be resumed will start downloading again. |
#8
|
||||
|
||||
you have to close jd before shutting computer down
windows does not *safely* shutdown java, its more a *now or die* solution. jdownloader is not informed to shutdown and so you might loose your database. until we found a nice solution to this, its better to close jd manually before shutdown
__________________
JD-Dev & Server-Admin |
#9
|
|||
|
|||
I see
well thanks for the information do you think it would be possible as a workaround to setup a system wide shutdown script to close jd manually ? (or maybe log off script instead of shutdown) PS : I know how to setup a script & how to do a bat and/or autohotkey file Last edited by whismerhill; 17.08.2011 at 17:11. |
#10
|
|||
|
|||
more precise question :
would such a "winclose" command **External links are only visible to Support Staff****External links are only visible to Support Staff** work ok for the purpose of saving the database if sent to JD ? thanks. edit: I ask this question because of the following comment in the command notes : "WinClose sends a WM_CLOSE message to the target window, which is a somewhat forceful method of closing it" so I'm not quite sure that JD would save its data if closed in this way Last edited by whismerhill; 17.08.2011 at 19:13. |
#11
|
|||
|
|||
I did a working script to close JD
& according to my testing it should close JD normally which relates in saving the database Deleting a link or adding a link or finishing to download a link & immediately running the script always saves the database before closing. but I may have missed something Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. SetTitleMatchMode, 3 ; exact title match mode ; This script will close ALL windows named exactly "JDownloader" ; (which should in theory relate only to JDownloader itself, however some folders could match. Eitherway this being a shutdown script it shouldn't have any serious impact) ; This script requires that JDownloader has the "Close to tray" option DISABLED or else it won't work ; This script also requires that JDownloader "are you sure you want to quit" does NOT show ; (because then the "WM_CLOSE" command will only result in sending JDownloader to the notification bar) Loop, 100 { IfWinExist, JDownloader { WinClose } Else { Break } sleep 10 } ExitApp Last edited by whismerhill; 17.08.2011 at 23:32. |
#12
|
|||
|
|||
If you aren't able to close jD manually, you can use jD's remote control interface. You can close jD with the action "**External links are only visible to Support Staff**. With "**External links are only visible to Support Staff** you can stop de downloads.
|
#13
|
|||
|
|||
I said I'll report back in a couple of weeks
so here it is : this works, the database seems to always save correctly with this in place. at least I had no further problems with database not saving when I do not close JD before shutting down the computer (which saves some clicks always a good thing...) sidenotes: thanks remi I'm not sure how I can execute a localnet link without launching a browser window though.(which can be annoying due to saved browser sessions) I will explore this as this is superior to a simple winclose command because it needs no change to the "Close to tray" setting. As it is, it already works though so there's absolutely no hurry. |
#14
|
|||
|
|||
If you don't want to juggle with the sessions of your default browser I would just install another (small) browser and let it connect to the URI. I suppose each browser has these commands but I'm not sure.
|
#15
|
||||
|
||||
@whismerhill
thanks for feedback
__________________
JD-Dev & Server-Admin |
|
|