[PVR] Feature: Confirm shutdown if PVR backend is not idle.

User story: In case shutdown is requested by the user while PVR is recordig or a  recording will start very soon (and XBMC machine potentially cannot restart fast enough), XBMC refuses to shutdown, but shows a Yes/No dialog to the user explaining that PVR is currently not idle and asking the user to shut down anyway. If user does nothing for 10 secs, the dialog will autoclose and shutdown will be cancelled.

Purpose: This is very useful to prevent accidentally stopped recordings.

BTW: This feature has been discussed from time to time in the forums and there were some (hacky) addons around to implement this, but no clean implementation (which IMO can only be done inXBMC itself.)
Initially my PR was very simple and came with a gui setting for enabling/disabling this feature.  I was"convinced" by the xbmc team that such a setting is not acceptable/needed because it has to work automatically. Thus, I started with implementation of all the islocalhost stuff (including the PVR add-on API change).

> Am 29.12.2014 um 11:15 schrieb Rainer Hochecker <notifications@github.com>:
> 
> In xbmc/ApplicationMessenger.cpp:
> 
> > @@ -261,6 +261,9 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
> >  
> >      case TMSG_POWERDOWN:
> >        {
> > +        if (!g_PVRManager.CheckShutdown())
> we need an option to disable this feature for users with a setup where this does harm.
> 
> —
> Reply to this email directly or view it on GitHub.
>