From df72c5a55f8a554fd3157d7e4c08e21dffd244c1 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 8 Jul 2014 11:16:51 +0900 Subject: [PATCH] split media and regular server urls --- anki/consts.py | 2 +- anki/sync.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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):