Some changes so that settings are saved between sessions

This commit is contained in:
bjschuma 2010-01-04 17:24:59 -05:00
parent e5dfd01a0d
commit 7cbb901229
4 changed files with 11 additions and 19 deletions

View File

@ -20,8 +20,8 @@ import settings
# Called every time the plugin is enabled
def open():
settings.set("curlib",-1)
pass
if settings.has("curlib") == False:
settings.set("curlib",-1)
# Called every time the plugin is stopped

View File

@ -43,15 +43,4 @@ def run(args=None):
else:
join = ' '
gstreamer.load(join.join(args))
#filename = expandPath(args[0])
#if checkPath(filename) == False:
# return
#write("loading file: "+filename)
#bin = gst.element_factory_make("playbin", None)
#bin.set_property("uri", "file://"+filename)
#bin.set_state(gst.STATE_PAUSED)
#pipeline = gst.Pipeline("player")
#pipeline.add(bin)

View File

@ -31,21 +31,24 @@ def next():
# Called every time the plugin is enabled
def open():
settings.set("current",0)
if settings.has("current") == False:
settings.set("current",0)
settings.set("next",next)
pass
# Called every time the plugin is stopped
def close():
settings.delete("next")
pass
# Called when the plugin needs to perform some action
def run(args=None):
id = settings.get("next")()
if settings.has("curlib") == False:
return
curlib = str(settings.get("curlib"))
id = settings.get("next")()
database.open()
a = database.select("path","library","id="+curlib).fetchone()[0]
b = database.select("path","track","id="+str(id)).fetchone()[0]

View File

@ -24,8 +24,8 @@ def next():
# Called every time the plugin is enabled
def open():
settings.set("random",False)
pass
if settings.has("random") == False:
settings.set("random",False)
# Called every time the plugin is stopped