mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
pass client media count to server
This commit is contained in:
parent
f057242da1
commit
4e900b4608
1 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,6 @@
|
|||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
import urllib
|
||||
import os
|
||||
import sys
|
||||
import gzip
|
||||
import random
|
||||
|
@ -16,6 +15,7 @@ from anki.consts import *
|
|||
from hooks import runHook
|
||||
import anki
|
||||
|
||||
|
||||
# syncing vars
|
||||
HTTP_TIMEOUT = 90
|
||||
HTTP_PROXY = None
|
||||
|
@ -750,8 +750,8 @@ class MediaSyncer(object):
|
|||
# step 5: sanity check during beta testing
|
||||
# NOTE: when removing this, need to move server tidyup
|
||||
# back from sanity check to addFiles
|
||||
s = self.server.mediaSanity()
|
||||
c = self.mediaSanity()
|
||||
s = self.server.mediaSanity(client=c)
|
||||
self.col.log("mediaSanity", c, s)
|
||||
if c != s:
|
||||
# if the sanity check failed, force a resync
|
||||
|
@ -797,9 +797,9 @@ class RemoteMediaServer(HttpSyncer):
|
|||
return json.loads(
|
||||
self.req("addFiles", StringIO(zip), comp=0))
|
||||
|
||||
def mediaSanity(self):
|
||||
def mediaSanity(self, **kw):
|
||||
return json.loads(
|
||||
self.req("mediaSanity"))
|
||||
self.req("mediaSanity", StringIO(json.dumps(kw))))
|
||||
|
||||
def mediaList(self):
|
||||
return json.loads(
|
||||
|
|
Loading…
Reference in a new issue