ocarina/src/core/load.py

51 lines
794 B
Python

# 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
name = "load"
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
# 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"
# Called when the plugin needs to perform some action
def run(args=None):
if args == None:
return
gstreamer.close()
if len(args) == 1:
gstreamer.load(args[0])
else:
join = ' '
gstreamer.load(join.join(args))