Posts: 5
Joined: Dec 2014
Reputation:
0
2014-12-30, 20:27
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.
Posts: 7,135
Joined: Oct 2012
un1versal
Out of Memory (1939–2016)
Posts: 7,135
2015-01-01, 10:52
(This post was last modified: 2015-01-01, 10:57 by un1versal.)
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.
Posts: 5
Joined: Dec 2014
Reputation:
0
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.]
Posts: 635
Joined: Nov 2012
Reputation:
15
phate89
Team-Kodi Member
Posts: 635
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)
Posts: 15,271
Joined: Jan 2009
Reputation:
729
ronie
Team-Kodi Member
Posts: 15,271
2015-01-02, 04:08
(This post was last modified: 2015-01-02, 04:09 by ronie.)
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.
Posts: 19,982
Joined: May 2009
Reputation:
451
nickr
Retired Team-Kodi Member
Posts: 19,982
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.)
Posts: 66
Joined: Dec 2011
Reputation:
0
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.