Damien Elmes
ae1491492f
unbury on sync start
...
https://forums.ankiweb.net/t/unburying-works-differently-on-anki-desktop-ankiweb-and-ios-app/6909
2021-01-28 11:54:48 +10:00
Damien Elmes
028fdb2562
coerce some more invalid decimal values to ints during sync
2021-01-25 09:43:50 +10:00
Damien Elmes
75f06e21bc
handle older clients not setting 'done' key when false
2021-01-24 09:05:17 +10:00
Damien Elmes
81b312ddd1
handle decks/notetypes with a duplicate name being sent in a sync
...
Typically caused by older clients, but could happen if the user added
the same name on different devices without syncing.
Also add an inactive test that was used to try track down this issue
and might be useful in the future.
2021-01-23 12:59:24 +10:00
Damien Elmes
12a36a7dc7
handle non-chunked graves from AnkiDroid
2021-01-22 10:00:25 +10:00
Damien Elmes
5cd125e2c8
add missing file header
2021-01-21 10:31:34 +10:00
Damien Elmes
57d32c6e4a
have register_tag mutate the tag if it changes it, instead of copying
2021-01-19 12:37:51 +10:00
abdo
112aa44c90
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-15 01:12:01 +03:00
abdo
dd3f0d44fe
Remove Default impl of Tag
2021-01-14 07:04:55 +03:00
Damien Elmes
6cc58451b1
add local sync server frontend
2021-01-13 11:42:00 +10:00
Damien Elmes
48892e588b
tidy up UTC offset handling/timing calculations
...
- use the TimestampSecs newtype instead of raw i64s
- use FixedOffset instead of a minutes_west offset
- check localOffset each time the timing is calculated, and set it
if it's stale - even for v1.
- check for and fix missing rollover when calculating timing
- stop explicitly passing localOffset in the sync/start call
2021-01-12 21:32:56 +10:00
Damien Elmes
f1fd6df0a6
move sync JSON into separate file; add enum wrapper
2021-01-12 18:47:08 +10:00
Damien Elmes
e89d02433d
allow normal sync tests to run offline
2021-01-12 18:47:08 +10:00
Damien Elmes
1cef09b2fa
use '<=' when merging UnchunkableChanges
...
Prevents current tests from failing when testing locally, due the current
second not changing between syncs.
2021-01-12 18:47:08 +10:00
abdo
a30a2638ce
Hierarchical tags
2021-01-09 17:10:13 +03:00
Damien Elmes
7f42500e53
rename some card+note fields in backend
2020-09-01 10:24:38 +10:00
Damien Elmes
988b3c00c1
move unbury/unsuspend routines into backend
2020-09-01 10:24:38 +10:00
Damien Elmes
7cfeb6cbb3
check if we need to unbury at the start of the sync process
...
https://forums.ankiweb.net/t/bug-buried-cards-in-filtered-decks-not-being-unburied-next-day/2541/24
2020-08-28 21:09:07 +10:00
Damien Elmes
41a47fcf01
fix some clippy lints
2020-08-26 19:02:56 +10:00
Damien Elmes
fb4105013f
add escape hatch for very slow connections
2020-08-26 18:44:20 +10:00
Damien Elmes
8c7c2eeda3
specify I/O timeout
...
We need to be a bit conservative here due to buffer bloat - in the
upload case on a slow link, it can appear that no I/O is happening
when a buffer is draining.
2020-08-26 18:30:51 +10:00
Damien Elmes
176ab312da
handle some instances of floats when an integer is expected during sync
2020-08-03 17:47:15 +10:00
Damien Elmes
bd37a7e17e
fix moves into/out of a filtered deck not syncing
...
the mtime comparison should have only been done if the object in the
local collection was also pending
2020-07-31 15:39:30 +10:00
Damien Elmes
cec1fdece5
move revlog out of sync code, and add enums
...
and remove type=4, which does not appear to be used
2020-06-16 16:31:36 +10:00
Damien Elmes
c6e5dc0ef6
check full upload return text
2020-06-09 08:50:16 +10:00
Damien Elmes
c5e65d02e1
add note/card removal to backend
2020-06-04 18:21:04 +10:00
Damien Elmes
7dc8df748b
ensure sync indicator updates after download
2020-06-02 15:10:41 +10:00
Damien Elmes
7536a3b899
fix full download on Windows
2020-06-02 15:06:23 +10:00
Damien Elmes
d7a2e78c0b
change sync label to indicate sync state
...
- blue for normal sync, red for full sync required
- refactor status fetching code so we don't hold a collection lock
during the network request, which slows things down
- fix sync spinner restarting when returning to deck list
2020-06-02 13:23:01 +10:00
Damien Elmes
a3e5068952
add some syncing tests - please see alpha2 notes before syncing
2020-06-01 19:44:25 +10:00
Damien Elmes
80210ab6bd
handle missing counts in sanity check
2020-06-01 19:38:41 +10:00
Damien Elmes
300769aac7
if both sides empty, allow either
2020-06-01 18:11:43 +10:00
Damien Elmes
da2dc7bd8c
tell AnkiWeb to abort on interrupt
2020-06-01 13:57:10 +10:00
Damien Elmes
da1e0527ca
report normal sync progress
...
Also:
- provide a way for the progress handler to skip the throttling so that
we can ensure progress is updated at the end of a stage
- show 'checking' at the end of full sync
2020-06-01 13:57:10 +10:00
Damien Elmes
1c52d11133
rework usn handling in sync
2020-06-01 13:57:10 +10:00
Damien Elmes
1303013ad6
add due counts to sanity check
2020-06-01 13:57:10 +10:00
Damien Elmes
0787381a99
login/full up/full down plugged in
2020-06-01 13:57:10 +10:00
Damien Elmes
aaed0464e5
rework progress handling
...
- client now polls status instead of backend pushing it
- supports multiple threads
- update throttling happens in one place
2020-06-01 13:57:10 +10:00
Damien Elmes
c4032c0176
another snapshot of sync work
...
progress handler is going to need to be reworked to function across
threads
2020-06-01 13:57:10 +10:00
Damien Elmes
b5284e8993
make sure we invalidate cache after direct update
2020-06-01 13:57:10 +10:00
Damien Elmes
2114fdf6f5
more syncing work
...
no checks yet
2020-06-01 13:57:10 +10:00
Damien Elmes
4d1e8d678d
full upload/download HTTP code
2020-06-01 13:57:10 +10:00
Damien Elmes
f17dec9f2a
start on HTTP client for syncing
2020-06-01 13:57:10 +10:00