Only back up changed files

We only need to back up files with a score != 0 and count != 0
This commit is contained in:
Bryan Schumaker 2010-12-01 22:06:00 -05:00
parent 3c920c72be
commit 2e5a62cbb7
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@ def decode_attr(attr):
def encode_track(doc, node, id):
filepath, score, count = get_attrs(id, "filepath", "score", "count")
if score == 0 and count == 0:
return
child = add_child(doc, node, "track", {"score":score, "count":count})
add_text(doc, child, filepath)