Commit graph

21 commits

Author SHA1 Message Date
Damien Elmes
17af26dcb5 apply black to all files 2019-12-23 10:34:10 +10:00
Damien Elmes
c1587254f4 use isort to tidy up imports 2019-12-20 19:19:29 +10:00
Damien Elmes
6ecfff56c5 add pytype inferred types to anki/
I've corrected some obvious issues, and we can fix others over time.
Mypy tests are currently broken, as adding the type hints has increased
mypy's testing surface.
2019-12-20 11:07:08 +10:00
Damien Elmes
ebdd8dae4b tidy up unused imports 2019-03-04 17:25:19 +10:00
Damien Elmes
372d5ed6e8 update copyright and clarify licenses 2019-02-05 14:01:33 +10:00
Damien Elmes
ae46bfa8d1 support dynamic sync url 2018-07-28 18:08:16 +10:00
Damien Elmes
bbccc4fd6b enable syncing w/ v2 scheduler, and bump sync version
any client using a sync version of 9 must be able to handle
the V2 scheduler
2018-01-30 17:52:03 +10:00
Damien Elmes
227ca090db use a constant for the starting factor 2017-02-08 17:28:12 +10:00
Damien Elmes
04bc1a7766 use sync.ankiweb.net for syncing
media sync goes through the same domain now, avoiding a slow extra
SSL handshake
2017-01-29 14:57:59 +10:00
Damien Elmes
a0bad7da45 update media url 2015-03-13 17:06:34 +11:00
Damien Elmes
df72c5a55f split media and regular server urls 2014-07-08 11:16:51 +09:00
dae
2aa7714f87 new media syncing protocol
- media syncing no longer locks the account, so it can be done
  in the background in the future, and multiple clients can safely
  sync media at the same time
- all operations are now idempotent, so they can be repeatedly safely
  in the event of a connection error
- whether it's a normal incremental sync, an initial sync,
  or the media database has been deleted, no files will be uploaded
  or downloaded if they already exist on the other side
- file removals are now chunked like additions & updates, preventing
  timeouts due to large requests
- if the server can't process a chunk in time, it will return a count
  of what it did process, so the client can retry the rest

Notes for AnkiDroid:

- when porting this, recommend you pick a different name for the
.media.db2 file, so users don't accidentally copy the AD version to
the desktop or vice versa
- please make sure filenames are added to the zip in NFC form
2014-06-26 09:00:38 +09:00
Damien Elmes
14a2321408 increase custom study size limit as well 2014-01-14 15:45:12 +09:00
Damien Elmes
8d7edcb2bb include a session key when syncing 2013-10-10 22:59:34 +09:00
Damien Elmes
f29a04ae29 bump sync ver to 7 and change meta return value
- /sync/meta now returns a dictionary
- it includes the following extra fields
- msg: if non-empty, show this message at the end of the sync
- cont: if false, show above message and abort sync
- uname: the user's email address, so it can be stored by the local client to
  show users who have forgotten which email address they used. in the future
  this will be saved only when logging in, so do a conditional access on it
2013-10-04 06:09:28 +09:00
Damien Elmes
318b4e371f bump sync ver to 6 (see note)
when porting this to other platforms, please ensure you have ported all
changes in sched.py after 2.0.12 first
2013-09-27 17:14:23 +09:00
Damien Elmes
492ed33f4d add relative overdueness option 2013-09-04 04:17:43 +09:00
Damien Elmes
c0454fe3e7 reduce max media count to 100 per chunk 2013-07-12 08:44:27 +09:00
Damien Elmes
f3f7835032 add upper bound to # of media files in single zip 2013-04-11 14:13:11 +09:00
Damien Elmes
e309a68306 update manual link 2013-01-09 07:50:49 +09:00
Damien Elmes
d477df8c28 merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00