Add functions for controlling "like"

This patch adds a function for getting the "like" status of the current
song.  It also changes the "set_like" function to use an event, rather
than just setting it.
This commit is contained in:
Bryan Schumaker 2010-12-18 11:03:25 -05:00
parent f55cb44a64
commit 0eb3a15783
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@ def toggle_rand():
prefs.set_pref("libsaria.random", not prefs.get_pref("libsaria.random"))
def set_like(like=None):
sources.set_attr("like", like)
return call("SETLIKE", sources.set_attr, "like", like)
def get_like():
return sources.get_attrs("like")
def load(file):
file = expand(file)