diff --git a/anki/consts.py b/anki/consts.py index 79760babd..d75c7b82e 100644 --- a/anki/consts.py +++ b/anki/consts.py @@ -48,7 +48,7 @@ MODEL_CLOZE = 1 SCHEMA_VERSION = 11 SYNC_ZIP_SIZE = int(2.5*1024*1024) SYNC_ZIP_COUNT = 25 -SYNC_BASE = os.environ.get("SYNC_BASE") or "https://ankiweb.net/" +SYNC_BASE = "https://ankiweb.net/" SYNC_VER = 8 HELP_SITE="http://ankisrs.net/docs/manual.html" diff --git a/anki/sync.py b/anki/sync.py index baff048dc..d3d261f85 100644 --- a/anki/sync.py +++ b/anki/sync.py @@ -607,6 +607,8 @@ class RemoteServer(HttpSyncer): HttpSyncer.__init__(self, hkey) def syncURL(self): + if os.getenv("DEV"): + return "http://localhost:5000/sync/" return SYNC_BASE + "sync/" def hostKey(self, user, pw): @@ -845,6 +847,8 @@ class RemoteMediaServer(HttpSyncer): HttpSyncer.__init__(self, hkey, con) def syncURL(self): + if os.getenv("DEV"): + return "http://localhost:5001/" return SYNC_BASE + "msync/" def begin(self):