Damien Elmes
7fe4a7c4ef
work around some typing inference issues
2019-12-16 17:52:51 +10:00
Damien Elmes
14b7828135
set instance vars in __init__()
2019-12-16 17:49:32 +10:00
Damien Elmes
76ac566b0a
force a full sync when fields or templates changed without schema mod
...
This is not an ideal solution and will not catch repositioned fields
or templates, but is at least an improvement over the previous behaviour.
https://github.com/dae/anki/pull/349#issuecomment-547236285
2019-10-30 10:17:09 +10:00
Damien Elmes
75a95ee1fb
tidy up unused imports
2019-03-04 17:25:19 +10:00
Damien Elmes
7d0f7ae33c
fix some warnings
2019-03-04 16:01:10 +10:00
Damien Elmes
085679d5d1
move versionWithBuild into anki module
2019-02-28 08:37:42 +10:00
Damien Elmes
a42bfe2839
send build number when syncing too
2019-02-19 08:04:25 +10:00
Damien Elmes
a7eb6bb357
update copyright and clarify licenses
2019-02-05 14:01:33 +10:00
Damien Elmes
2c24401d6b
support timeout customization
2018-09-19 23:47:54 +10:00
Damien Elmes
7d5b78ef95
add missing headers in get calls
2018-09-19 23:45:52 +10:00
Damien Elmes
86bf9e53a0
prevent new users from downloading accidentally
2018-09-05 19:53:41 +10:00
Damien Elmes
1d97d284e9
support dynamic sync url
2018-07-28 18:08:16 +10:00
Damien Elmes
3c1aa8242f
chunk deletions to reduce load on AnkiWeb
2018-07-26 21:34:53 +10:00
Damien Elmes
ee5eedeb3b
strip out unused syncing code
2018-07-26 19:41:52 +10:00
Damien Elmes
7ae073e955
check upload doesn't exceed ankiweb limits
...
better to abort prior to upload instead of giving a misleading error
2018-04-30 16:58:00 +10:00
Damien Elmes
cdee96baa6
add envvar to disable ssl verification
2018-04-30 15:36:55 +10:00
Damien Elmes
a681a8e299
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
f6669cc362
work around some decks with mod time stored as string
2018-01-19 11:42:06 +10:00
Damien Elmes
1f818aa10b
disable syncing and deck exports for v2 sched
2018-01-14 17:35:59 +10:00
Damien Elmes
4875d0502e
add the ability to disable cert verification
2017-12-07 17:15:20 +10:00
Damien Elmes
3ad9261c8c
catch corrupt media db, fix it in 'check media'
2017-08-17 13:33:54 +10:00
Damien Elmes
0543a4533b
add devMode flag to utils
...
also remove the extra toolbar call in loadProfile(), as we require a
restart to update the translations anyway
2017-08-01 14:28:13 +10:00
Illia Volochii
13b7e01044
Stop inheriting from object
...
It is not needed in Python 3.
2017-02-07 00:21:33 +02: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
4380705992
add timeout to sync steps
2017-01-17 15:53:17 +10:00
Damien Elmes
f104044a09
adjust user agent name
2017-01-08 19:57:04 +10:00
Damien Elmes
f6245cdfd1
use requests for http; add progress info back
...
- wrap request in AnkiRequestsClient so we can keep track of
upload/download bytes without having to monkey patch anything
- force a 64kB buffer size instead of the default 8kB
- show one decimal point in up/down so small requests still give
visual feedback
- update add-on downloading and update check to use requests
- remove the update throttling in aqt/sync.py, as it's not really
necessary anymore
2017-01-08 19:06:32 +10:00
Damien Elmes
03b2ad37d9
add (currently unused) abort command
2016-12-25 12:54:47 +10:00
Damien Elmes
d181133ac0
some sync fixes
...
- fix an extra \r\n being included at the end of the last form var
- req()s in the middle of a sync should throw an exception if they
receive a 403, as the calling code does not check for an empty return
2016-12-21 10:42:13 +10:00
Christoph Mack
079d551782
Add missing boundary at end of multipart/form-data request body for requests that include no application/octet-stream data
...
This makes the sync request sent to the /download endpoint valid multipart/form-data according to RFC 2046, 5.1
2016-09-03 14:15:09 +02:00
Damien Elmes
05d13de766
fix up ankiweb.certs paths
...
also fixes
https://anki.tenderapp.com/discussions/ankidesktop/18420-portable-anki-sync-error
2016-07-07 11:58:06 +10:00
Damien Elmes
94463991bc
basic sync support
...
currently no progress shown on large uploads/downloads
2016-07-04 15:45:53 +10:00
Damien Elmes
15b349e3a8
start port to python 3
...
unit tests pass and main screens of GUI load
2016-05-12 14:45:35 +10:00
Damien Elmes
a27847de58
DEV->ANKIDEV
2015-05-19 14:26:33 +10:00
Damien Elmes
a0bad7da45
update media url
2015-03-13 17:06:34 +11:00
Damien Elmes
67c86e8f5e
make sure sync msg is saved before we abort sync
2015-03-12 12:51:05 +11:00
Damien Elmes
7024fed002
fix cont=False handling in sync
2015-03-02 21:09:12 +11:00
Damien Elmes
e294469521
cont should be checked befoer any further processing
2014-11-06 16:56:16 +09:00
Damien Elmes
6e7e08ebd0
be explicit about modSchema()'s check flag
...
- remove gui code that adds exceptions for syncing
- use check=False for all syncing and upgrade code
2014-11-03 16:28:12 +09:00
Damien Elmes
3d5d852708
reduce sync chunk size
2014-10-19 16:58:26 +09:00
Damien Elmes
3ee1937310
we need to count up for downloads
...
as we're streaming changes we don't know the total amount of downloads
required
2014-07-29 07:37:30 +09:00
Damien Elmes
cf801e4fb4
display more feedback when syncing media
...
deletes in particular take some time for the server to process, but
don't require much bandwidth, leading to the progress appearing to
have pause when content is actually being processed
this also gives the user an idea of how long the process will take to
complete
2014-07-28 17:00:26 +09:00
Damien Elmes
f5d60c70e2
remove unused functions
2014-07-28 14:28:12 +09:00
Damien Elmes
ba8ed39e13
fix media sync thinking >25 changes is a concurrent update
2014-07-15 11:36:52 +09:00
Damien Elmes
77c9d5f5f3
tweak dev url
2014-07-12 18:21:49 +09:00
Damien Elmes
df72c5a55f
split media and regular server urls
2014-07-08 11:16:51 +09:00
Damien Elmes
a93c3423e3
must commit on concurrent update
2014-07-04 18:06:40 +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
dae
bc90904acd
return success if media sync completes
2014-06-05 13:33:47 +09:00
Damien Elmes
c529a77686
bundle new and old cert
...
fails to validate on some systems even when httplib2's default
certs are bundled, so we need this not just for SNI
2014-04-11 01:13:55 +09:00