libsaria: Reset library

This clears the entire library and creates an empty tag tree.
This commit is contained in:
Bryan Schumaker 2011-05-21 15:42:59 -04:00
parent c74f9680b2
commit 17d83d8fff
2 changed files with 11 additions and 0 deletions

View File

@ -18,3 +18,7 @@ def update_lib():
def num_visible():
return library.size()
def reset():
library.reset()
tree.make_tree()

View File

@ -24,6 +24,13 @@ def load():
def save():
storage.save_obj(LIB_FILE, lib_dict)
def reset():
global lib_dict
lock_library()
lib_dict = {}
save()
unlock_library()
def add_path(path):
lock_library()
lib_dict.setdefault(path, dict())