initial usn is 0, so distinguish between 0 and false

This commit is contained in:
Damien Elmes 2011-12-05 15:27:06 +09:00
parent b33c2e99c0
commit 0395047579
2 changed files with 4 additions and 1 deletions

View file

@ -163,6 +163,9 @@ class DeckManager(object):
"A list of all decks."
return self.decks.values()
def count(self):
return len(self.decks)
def get(self, did, default=True):
id = str(did)
if id in self.decks:

View file

@ -565,7 +565,7 @@ class MediaSyncer(object):
runHook("sync", "streamMedia")
zip = self.files()
usn = self.server.addFiles(zip=zip)
if usn:
if usn is not False:
# when server has run out of files, it returns bumped usn
break
# step 5: finalize