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:
parent
2624a1afe8
commit
4c916f2fd3
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue