Am Samstag, 17. Mai 2008 11.43:07 schrieb John Molohan:
>  Duncan Webb wrote:
> Andreas Dick wrote:
>
> hei freevoers
> I wrote a plugin that allows to define an event list that will be called
> after the first few seconds of inactivity... I use it to start the radio as
> default action, but only if in the first 5 seconds appears no other action
> (event).
>
> the config looks like this:
>
> plugin.activate('autostart')
> AUTOSTART_TIMEOUT = 5
> AUTOSTART_EVENTS = ( 'MENU_DOWN', 'MENU_DOWN', 'MENU_SELECT',
> 'MENU_SELECT')
>
> what do you mean? would this be possible in another way, or could this
> plugin be of interest like that?
>
>
> IIRC there was a discussion about this a while ago and it would be a
> useful addition.
>
> Duncan
>
>  This would be great. The autoshutdown plugin has a default wake up time in
> it. If coupled with this then you have an alarm clock feature with freevo
> :) Maybe it would be good to add a submenu entry to the shutdown command
> that would set the default (or specified) wake up time and set an autostart
> flag that would be read to go straight into playing the radio etc. That way
> it could be used without always defaulting to turning on after the
> autostart_timeout?
>
>  John

The plugin ist yet very simply (see the atachement), but its open to pack more 
functionality in it...

I will add it at sourceforge as well

Andreas

Attachment: autostart.py
Description: application/python

Index: freevo/local_conf.py.example
===================================================================
--- freevo/local_conf.py.example	(Revision 10720)
+++ freevo/local_conf.py.example	(Arbeitskopie)
@@ -111,7 +111,29 @@
 # SYS_SHUTDOWN_CMD = "sudo shutdown -h now"
 # SYS_RESTART_CMD = "sudo shutdown -r now"
 
+
 # ======================================================================
+# AUTOSTART CONFIGURATION
+# ======================================================================
+# The autostart plugin allows you to define an action that will be
+# called when the user do not interact in the first few seconds.
+# With this it is possible to define a default action e.g. starting
+# radio if there is no activity else.
+
+# uncomment this to activate the autostart plugin:
+# plugin.activate('autostart')
+
+# TIMEOUT
+# the timeout in seconds, after this time the events are called
+# AUTOSTART_TIMEOUT = 5
+
+# EVENTS
+# freevo events in a list of strings
+# AUTOSTART_EVENTS = (
+#     'MENU_DOWN', 'MENU_DOWN', 'MENU_SELECT', 'MENU_SELECT')
+
+
+# ======================================================================
 # AUTOSHUTDOWN CONFIGURATION
 # ======================================================================
 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to