Reset playlist and library functions

These functions should be called to reset the library and playlist,
which is better than deleting the old files and making a new one.
This commit is contained in:
Bryan Schumaker 2010-11-03 08:11:15 -04:00
parent 2624a1afe8
commit 4c916f2fd3
1 changed files with 10 additions and 0 deletions

View File

@ -38,6 +38,11 @@ def walk_library():
for track in library.walk_tags():
yield track
def lib_reset():
global library
library.reset()
library.save()
def lib_get_attr(id, attr):
global library
if id >= 0:
@ -109,6 +114,11 @@ def plist_filter(text):
global playlist
return playlist.filter(text)
def plist_reset():
global playlist
playlist.reset()
playlist.save()
def plist_refresh():
return call("PLISTREFRESH")