ocarina/src/core/load.py

51 lines
794 B
Python
Raw Normal View History

2009-12-22 00:29:19 -05:00
# This is a simple test plugin, to make sure everything is working
__author__="bjschuma"
__date__ ="$Dec 21, 2009 10:35:01 PM$"
global name, app, type, path, opt
2009-12-22 00:37:52 -05:00
name = "load"
2009-12-22 00:29:19 -05:00
app = "ocarina"
type = "core"
path = ""
opt = []
from bt.message import write
from bt.file import *
import settings
#from tools import gstream
from tools import gstreamer
2009-12-22 00:29:19 -05:00
# Called every time the plugin is enabled
def open():
pass
#write("Example plugin has been changed",True)
# Called every time the plugin is stopped
def close():
pass
def help():
return "Loads a music file"
2009-12-22 00:29:19 -05:00
# Called when the plugin needs to perform some action
def run(args=None):
if args == None:
return
2010-01-02 13:59:16 -05:00
gstreamer.close()
if len(args) == 1:
gstreamer.load(args[0])
else:
join = ' '
gstreamer.load(join.join(args))
2009-12-22 00:29:19 -05:00