xbmc/xbmc — pull request #4342 by ksooo (2014-03-06 19:45:01+00:00)
Title: Feature: Inhibit shutdown if PVR is not idle. Can be switched on/off via...

... PVR energy saving settings.

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 an error dialog to the user explaining that shutdown is currently not possible because PVR is not idle. The user must be able to toggle this feature on and off using PVR power saving settings.

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.)