All plugins have a help function to make use of recent scion changes

This commit is contained in:
bjschuma 2010-01-16 12:14:40 -05:00
parent 2d78ea8fc9
commit 2efc3034a7
11 changed files with 44 additions and 3 deletions

View File

@ -29,6 +29,10 @@ def close():
pass
def help():
return "Used to create a new library"
def library(args):
name = "Default"
root = ""

View File

@ -32,6 +32,10 @@ def close():
pass
def help():
return "Loads a music file"
# Called when the plugin needs to perform some action
def run(args=None):

View File

@ -26,6 +26,10 @@ def close():
pass
def help():
return "Lists all available libraries"
# Called when the plugin needs to perform some action
def run(args=None):
cur = str(settings.get("curlib"))

View File

@ -45,6 +45,10 @@ def close():
pass
def help():
return "Advances to the next song"
# Called when the plugin needs to perform some action
def run(args=None):
if settings.has("curlib") == False:

View File

@ -25,8 +25,7 @@ from tools import gstreamer
settings.set("user", join(settings.get("user"),".ocarina2"))
mkdir(settings.get("user"))
#manager.restoresession()
bt.proc.setname("Ocarina2")
settings.set("appname","ocarina")
# Called every time the plugin is enabled
@ -41,6 +40,10 @@ def close():
write("Ocarina has been stopped",True)
def help():
return "A simple music player"
# Called when the plugin needs to perform some action
def run(args=None):
pass

View File

@ -24,6 +24,10 @@ def close():
pass
def help():
return "Pauses playback"
# Called when the plugin needs to perform some action
def run(args=None):
gstreamer.pause()

View File

@ -25,6 +25,10 @@ def close():
pass
def help():
return "Begins playback"
# Called when the plugin needs to perform some action
def run(args=None):
gstreamer.play()

View File

@ -35,6 +35,9 @@ def close():
pass
def help():
return "Scans over a directory and attempts to add the music files"
# Performs the actual scanning
def scan(dir):
files = ls(dir)

View File

@ -26,6 +26,10 @@ def close():
pass
def help():
return "Switches between multiple libraries"
# Called when the plugin needs to perform some action
def run(args=None):
if args == 0:

View File

@ -1,2 +1,5 @@
__author__="bjschuma"
__date__ ="$Jan 9, 2010 8:07:29 PM$"
__date__ ="$Jan 9, 2010 8:07:29 PM$"
__all__ = ["rand"]

View File

@ -38,6 +38,10 @@ def close():
pass
def help():
return "Changes next to play a random song"
# Called when the plugin needs to perform some action
def run(args=None):
if args==None or len(args)==0: