Merge branch 'master' of https://github.com/dae/anki
This commit is contained in:
commit
3e2dfe1c13
@ -28,6 +28,6 @@ if arch[1] == "ELF":
|
||||
sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % (
|
||||
sys.version_info[1], arch[0][0:2])))
|
||||
|
||||
version="2.0.13" # build scripts grep this line, so preserve formatting
|
||||
version="2.0.14" # build scripts grep this line, so preserve formatting
|
||||
from anki.storage import Collection
|
||||
__all__ = ["Collection"]
|
||||
|
@ -2,15 +2,21 @@
|
||||
# Copyright: Damien Elmes <anki@ichi2.net>
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
import os, shutil, re, urllib, unicodedata, \
|
||||
sys, zipfile
|
||||
import send2trash
|
||||
import os
|
||||
import re
|
||||
import urllib
|
||||
import unicodedata
|
||||
import sys
|
||||
import zipfile
|
||||
from cStringIO import StringIO
|
||||
|
||||
import send2trash
|
||||
from anki.utils import checksum, isWin, isMac, json
|
||||
from anki.db import DB
|
||||
from anki.consts import *
|
||||
from anki.latex import mungeQA
|
||||
|
||||
|
||||
class MediaManager(object):
|
||||
|
||||
soundRegexps = ["(?i)(\[sound:(?P<fname>[^]]+)\])"]
|
||||
@ -356,7 +362,7 @@ class MediaManager(object):
|
||||
# the later forgetAdded() call easier
|
||||
fnames.append([fname])
|
||||
z.write(fname, str(cnt))
|
||||
files[str(cnt)] = fname
|
||||
files[str(cnt)] = unicodedata.normalize("NFC", fname)
|
||||
sz += os.path.getsize(fname)
|
||||
if sz > SYNC_ZIP_SIZE or cnt > SYNC_ZIP_COUNT:
|
||||
break
|
||||
|
16
aqt/sync.py
16
aqt/sync.py
@ -149,23 +149,23 @@ and try again.""")
|
||||
return _("""\
|
||||
The connection to AnkiWeb timed out. Please check your network \
|
||||
connection and try again.""")
|
||||
elif "500" in err:
|
||||
elif "code: 500" in err:
|
||||
return _("""\
|
||||
AnkiWeb encountered an error. Please try again in a few minutes, and if \
|
||||
the problem persists, please file a bug report.""")
|
||||
elif "501" in err:
|
||||
elif "code: 501" in err:
|
||||
return _("""\
|
||||
Please upgrade to the latest version of Anki.""")
|
||||
# 502 is technically due to the server restarting, but we reuse the
|
||||
# error message
|
||||
elif "502" in err:
|
||||
elif "code: 502" in err:
|
||||
return _("AnkiWeb is under maintenance. Please try again in a few minutes.")
|
||||
elif "503" in err:
|
||||
elif "code: 503" in err:
|
||||
return _("""\
|
||||
AnkiWeb is too busy at the moment. Please try again in a few minutes.""")
|
||||
elif "504" in err:
|
||||
elif "code: 504" in err:
|
||||
return _("504 gateway timeout error received. Please try temporarily disabling your antivirus.")
|
||||
elif "409" in err:
|
||||
elif "code: 409" in err:
|
||||
return _("Only one client can access AnkiWeb at a time. If a previous sync failed, please try again in a few minutes.")
|
||||
elif "10061" in err or "10013" in err:
|
||||
return _(
|
||||
@ -174,8 +174,10 @@ AnkiWeb is too busy at the moment. Please try again in a few minutes.""")
|
||||
return _(
|
||||
"Server not found. Either your connection is down, or antivirus/firewall "
|
||||
"software is blocking Anki from connecting to the internet.")
|
||||
elif "407" in err:
|
||||
elif "code: 407" in err:
|
||||
return _("Proxy authentication required.")
|
||||
elif "code: 413" in err:
|
||||
return _("Your collection or a media file is too large to sync.")
|
||||
return err
|
||||
|
||||
def _getUserPass(self):
|
||||
|
Loading…
Reference in New Issue
Block a user