Sleep timer specification

From MythTV Official Wiki
Revision as of 12:29, 23 August 2007 by Mattwire (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Sleep Timer

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