Linux on reboot/power off send signal to xbmc to stop playback?
#1
Hello,

ive just noticed a thing with xbmc/kodi 14 that im running on ubuntu server 14.04,

if for say unattended-updates run and need to reboot, it does, and no issue with that,

but i was wondering if theres anyway to send a commandline signal to xbmc to stop playback?

so i can send that signal on reboots and power offs etc.. so if im watching a movie it saves where in the film i am...

if its not possible well its not a big problem, cause i put reboot orders to execute at 2am that time the htpc shouldnt be on anyway, but in case it might happen that i loose where i was in the movie..

just thought this should be the place to find if anyone knows if its possible..
Reply
#2
possible with json or xbmc-send
Reply
#3
perfect thanks wsnipex will look in to those options Smile
Reply
#4
It should do this by default, shouldn't need any extras afaik. We know quite well if the system is shutting down or restarting.

EDIT: looking at the code we don't seem to get the events from the system. However a reboot and powerdown should trigger a sane exit of xbmc, which should stop and store the progress.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#5
(2014-10-12, 13:30)topfs2 Wrote: It should do this by default, shouldn't need any extras afaik. We know quite well if the system is shutting down or restarting.

EDIT: looking at the code we don't seem to get the events from the system. However a reboot and powerdown should trigger a sane exit of xbmc, which should stop and store the progress.

if you could put that somewhere in a todo list, it would be perfect, cause thats the way i think xbmc should work, but just system reboots and poweroffs didnt do this, so i was thinking on how to make it just atleast store progress on the movie...

i was thinking of putting a bugreport on this, as if i use the app to trigger reboot or poweroff inside xbmc it does save the info..
but not when its system triggerd.. but then i thought it might been intentional that you didnt want that behaviour..

would it be good or bad to put in such bugreport?
that is do you want it or will it just be put somewhere in a black box and taken out sometime when someone is bored..
Reply
#6
Well I mean it should do it now. If a clean exit is triggered, it should stop and store the progress.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#7
(2014-10-12, 15:34)topfs2 Wrote: Well I mean it should do it now. If a clean exit is triggered, it should stop and store the progress.

alright i'll put in a bugreport on this if its supposed to do a clean exit even if its a system triggerd poweroff or reboot. cause in those cases it doesnt do a clean exit.

thanks for the info.
Reply
#8
It is outside of our hands. Its up to the OS and how you shut it down. So only do a bugreport if it doesn't work on a clean exit. All other cases is your system doing it wrong.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#9
(2014-10-12, 16:01)topfs2 Wrote: It is outside of our hands. Its up to the OS and how you shut it down. So only do a bugreport if it doesn't work on a clean exit. All other cases is your system doing it wrong.

alright so its probably something that can be fixed with the upstart init script then. to make sure it makes a clean exit..
Reply

Logout Mark Read Team Forum Stats Members Help
on reboot/power off send signal to xbmc to stop playback?0