mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
return false, not 'continue', when not finished
This commit is contained in:
parent
b99dbb1466
commit
b33c2e99c0
3 changed files with 3 additions and 4 deletions
|
@ -144,7 +144,7 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?, conf=?""",
|
|||
self.media.close()
|
||||
|
||||
def reopen(self):
|
||||
"Reconnect to DB (after changing threads, etc). Doesn't reload."
|
||||
"Reconnect to DB (after changing threads, etc)."
|
||||
import anki.db
|
||||
if not self.db:
|
||||
self.db = anki.db.DB(self.path)
|
||||
|
|
|
@ -347,7 +347,6 @@ create table log (fname text primary key, type int);
|
|||
if finished:
|
||||
self.syncMod()
|
||||
# also need to clear log after sync finished
|
||||
|
||||
return finished
|
||||
|
||||
# Streaming zips
|
||||
|
|
|
@ -557,7 +557,7 @@ class MediaSyncer(object):
|
|||
while 1:
|
||||
runHook("sync", "streamMedia")
|
||||
zip = self.server.files()
|
||||
if self.addFiles(zip=zip) != "continue":
|
||||
if self.addFiles(zip=zip):
|
||||
break
|
||||
# step 4: stream files to the server
|
||||
runHook("sync", "client")
|
||||
|
@ -565,7 +565,7 @@ class MediaSyncer(object):
|
|||
runHook("sync", "streamMedia")
|
||||
zip = self.files()
|
||||
usn = self.server.addFiles(zip=zip)
|
||||
if usn != "continue":
|
||||
if usn:
|
||||
# when server has run out of files, it returns bumped usn
|
||||
break
|
||||
# step 5: finalize
|
||||
|
|
Loading…
Reference in a new issue