[Feature Request] Shutdown menu ... add Restart
#1
Lightbulb 
Could Restart be added to the shut down menu [Exit/Custom shutdown timer/Suspend/Hibernate] please?

Restarting is instructed at various points [e.g. Enable debugging], and other times things seem hung [perhaps something has timed out] and it seems prudent to restart to see if the unexpected behaviour continues.

It would be a convenience if restart were a choice here.

CDN$0.02

Thanks for listening.
Reply
#2
Welcome to forums.

That's really helpful actually and specifically on the logging portion is concerned.

I have this fully working on my Linux setup (Ubuntu minimal + kodi), in my case there is no desktop environment (dedicated htpc) and system is using an upstart script to boot into kodi, in this case pressing exit triggers a restart (its a unintended side effect)

The only issue with implementing this properly this is that varied methods are OS dependant and such solution needs to be implemented on all platforms so it works as intended irrespective of OS.
Reply
#3
It probably shouldn't be that hard, but is probably a base kodi change, for the reasons you indicate.

Clearly the code for shutdown is already there, as there is a shutdown item.

Presumably somewhere there is a CallShutdown() type bit of code that this calls. There will be within it the smarts you talk about. (Which OS are we on, what call does that OS need to do this bit of magic, call it.)

Kodi will also know how it started up (again, in the guts, likely similar to Shutdown(), but StartingUp(), calling InitThis(), InitThat().) Presumably it shouldn't be too hard (i.e. little sleuthing, the functions will all be in that/those areas of the code) to create CallRestart() around that same area.

Ultimately the equivalent to:
SetStartup()
{
echo argv[] -> str_ExecStartup
}
CallRestart()
{
exec `echo ShutdownCall()` & str_ExecStartup;
}

Sort of thing.

i.e. The smarts are already in the code, just a matter of a CallForReset() call for Restart to call, and collecting the calls that are already in the code.

Not saying this is earth shaking or an emergency, but probably not that hard, if onerous.

Granted: If all you want is a library refresh, media rescan, this should all largely 'just work'. But if you need restart for some other reason, you're already into a problematic situation, and any weirdness the Restart call runs into you've already run into and Restart isn't going to help. [i.e. Restart becomes a user sanity check that weirdness is going on, not just timeouts / indices not caught up to contents yet. If Restart works, that's what you ran into. If it doesn't, confirmation that you were already in a hurting state. Let alone not being able to get to Restart on a frozen system, in the first place.]

BUT ... and this just occurs to me ... if the call to restart logs stuff, like ... successfully shut down this, successfully shut down that ... this could be a useful sleuthing tool (When we called for restart, this and this and this wasn't the problem ... oh - that died an unhappy death ... look deeper into that.]
Reply
#4
Maybe I'm missing something but confluence like every skin has a button to reboot (xbmc.reset) that is visible only if kodi is able to reboot in that platform (system.Canreboot)
Reply
#5
(2015-01-02, 02:39)phate89 Wrote: Maybe I'm missing something but confluence like every skin has a button to reboot (xbmc.reset) that is visible only if kodi is able to reboot in that platform (system.Canreboot)

D'OH Tongue ... are you saying that the reboot icon will only restart kodi and not reboot the entire machine?

If so ... (D'OH?) that isn't apparent ... perhaps a different icon could display for that situation?

If not ... I was looking to restart kodi only, not the entire machine. (Debug tail -f up on a console, browser, etc. - not looking to have to reorganize all that too in this situation.)

So, I'm suggesting a restart (not reboot) facility, or ... if it turns out that that's already there in the on/off icon, make that it is a reset not a restart more apparent?

On the menu change the 'Reboot' to 'Restart kodi' (or just add 'kodi' to 'reboot'?), and perhaps change the background of the on/off button to be the kodi icon? (Indicating only kodi is being turned off/on?)

Just a (CDN$0.02) thought?
Reply
#6
the 'Reboot' command will reboot the entire system.

there also is a 'RestartApp' command, that will only restart Kodi.
however, this functionality is only implemented on windows and linux versions of Kodi.
also, i've had various levels of success throughout the years with restarting Kodi this way.
sometimes it works flawlessly, but at other times, Kodi would just exit and not start again
or it would simply lockup.

anyway, because it's not available on all platforms Kodi supports and since it's quite buggy in my experience
it will not be added to the shutdown menu of Confluence.
what you could do though, is map the 'RestartApp' to a button on your keyboard/remote.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
Similarly to uNiversal my openelec systems restart XBMC/Kodi when you close it (either with the kill command or from the S menu)
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#8
(2015-01-02, 03:12)bs27975 Wrote:
(2015-01-02, 02:39)phate89 Wrote: Maybe I'm missing something but confluence like every skin has a button to reboot (xbmc.reset) that is visible only if kodi is able to reboot in that platform (system.Canreboot)

D'OH Tongue ... are you saying that the reboot icon will only restart kodi and not reboot the entire machine?

If so ... (D'OH?) that isn't apparent ... perhaps a different icon could display for that situation?

If not ... I was looking to restart kodi only, not the entire machine. (Debug tail -f up on a console, browser, etc. - not looking to have to reorganize all that too in this situation.)

So, I'm suggesting a restart (not reboot) facility, or ... if it turns out that that's already there in the on/off icon, make that it is a reset not a restart more apparent?

On the menu change the 'Reboot' to 'Restart kodi' (or just add 'kodi' to 'reboot'?), and perhaps change the background of the on/off button to be the kodi icon? (Indicating only kodi is being turned off/on?)

Just a (CDN$0.02) thought?
No there are 2 different commands:
Xbmc.reset that reboot the system
Xbmc.restartapp that restart only kodi

The first is in every skin but the second don't. like ronie said restartapp not always work so you have to manually add to your skin and try it
Reply
#9
I'm wondering about something similar, I have a nuc that has more than one OS on it and often use openelec in evening and use the custom shutdown timer. Is there a way of having the custom shutdown Not shutting down, but restarting instead? (I can then have default OS boot (with does all my usenet stuff etc)) ... Maybe Advancedsettings.xml or something?

Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
[Feature Request] Shutdown menu ... add Restart0