Difference between revisions of "Sleep timer specification"

From MythTV Official Wiki
Jump to: navigation, search
(Specification for new sleep timer in mythtv)
 
m (Sleep Timer)
Line 1: Line 1:
=== Sleep Timer ===
 
 
Mythtv currently has a sleep timer within LiveTV (Internal player?) which will automatically close livetv and return to the main menu.
 
Mythtv currently has a sleep timer within LiveTV (Internal player?) which will automatically close livetv and return to the main menu.
  
 
This is a specification for a more full-featured, frontend-wide sleep timer.
 
This is a specification for a more full-featured, frontend-wide sleep timer.
  
----
 
 
== Requirements ==
 
== Requirements ==
 
* Sleep action should be configurable.  For example, user may want to exit to main menu or shutdown the machine.  Should probably fall back to main menu if other commands fail.
 
* Sleep action should be configurable.  For example, user may want to exit to main menu or shutdown the machine.  Should probably fall back to main menu if other commands fail.

Revision as of 12:30, 23 August 2007

Mythtv currently has a sleep timer within LiveTV (Internal player?) which will automatically close livetv and return to the main menu.

This is a specification for a more full-featured, frontend-wide sleep timer.

Requirements

  • Sleep action should be configurable. For example, user may want to exit to main menu or shutdown the machine. Should probably fall back to main menu if other commands fail.
  • Sleep function should be available from all plugins.

Implementation

  • Function activateSleepTimer(int timeout:seconds).
  • Function to get time intervals (eg. 15mins,30mins etc).
  • Configuration option to set command. If blank will fall back to default and exit to main menu.
  • Mythshutdown -x would be ideal as the default command to execute here.

Logic:

Sleep Timer triggered ->

Execute command if set ->

- - If result is true then DONE.

- - If result is false then exit to main menu. DONE