mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
initial usn is 0, so distinguish between 0 and false
This commit is contained in:
parent
b33c2e99c0
commit
0395047579
2 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue