Author: dmeyer
Date: Sun Jan 29 16:58:59 2006
New Revision: 7891
Modified:
trunk/ui/src/plugins/mbus.py
Log:
send current playing item in status
Modified: trunk/ui/src/plugins/mbus.py
==============================================================================
--- trunk/ui/src/plugins/mbus.py (original)
+++ trunk/ui/src/plugins/mbus.py Sun Jan 29 16:58:59 2006
@@ -7,7 +7,7 @@
# freevo ui imports
import plugin
import application
-import event
+from event import *
class PluginInterface(plugin.Plugin):
def __init__(self):
@@ -23,6 +23,9 @@
mbus.connect_rpc(self.status, 'home-theatre.status')
self.status = mbus.status
+ self.status.set('idle', 0)
+ self.status.set('playing', '')
+
def plugin_activate(self):
"""
@@ -49,7 +52,7 @@
def stop(self):
- event.STOP.post()
+ STOP.post()
return []
@@ -66,6 +69,10 @@
def eventhandler(self, event):
# each event resets the idle time
+ if event == PLAY_START and event.arg and hasattr(event.arg, 'url'):
+ self.status.set('playing', event.arg.url)
+ if event == PLAY_END:
+ self.status.set('playing', '')
self.idle_time = 0
return True
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog