Commit graph

39 commits

Author SHA1 Message Date
Damien Elmes
5d164bea7f update TR references that contain arguments 2021-03-26 14:21:04 +10:00
Damien Elmes
1df14f7c9c update no-arg tr references in qt/ 2021-03-26 13:48:26 +10:00
Damien Elmes
b96db893ec nest progress messages and remove Python wrapper class
The progress messages are only really intended to be consumed by Anki.
If consumption by add-ons was expected, we'd be better off keeping the
wrapper, as the API for oneofs in Python is quite awkward to use.
2021-02-08 16:40:27 +10:00
Damien Elmes
759e646f5d fix backup not being taken before full download 2021-02-06 19:01:48 +10:00
Damien Elmes
9702532fc4 more typing updates 2021-02-02 23:31:55 +10:00
Damien Elmes
a1a70b1809 fix sync warning caused by mistake in typing work 2021-02-02 10:43:49 +10:00
Damien Elmes
748aeb9df1 add a bunch of return types 2021-02-01 23:53:23 +10:00
Damien Elmes
56a75c07dc add public wrappers for remaining backend functions 2021-01-31 18:56:16 +10:00
Damien Elmes
a6be0f493b start work on more clearly defining backend/protobuf boundaries
- anki._backend stores the protobuf files and rsbackend.py code
- pylib modules import protobuf messages directly from the
_pb2 files, and explicitly export any will be returned or consumed
by public pylib functions, so that calling code can import from pylib
- the "rsbackend" no longer imports and re-exports protobuf messages
- pylib can just consume them directly.
- move errors to errors.py

Still todo:

- rsbridge
- finishing the work on rsbackend, and check what we need to add
back to the original file location to avoid breaking add-ons
2021-01-31 18:55:45 +10:00
Damien Elmes
0accefcd94 drop basicCheck()
It can considerably slow down syncing on large collections
2021-01-12 18:47:08 +10:00
Damien Elmes
8075d46011 convert setWindowFlags call into helper, and fix invalid variables
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
BlueGreenMagick
9a29d1b97a remove context help button 2021-01-06 22:15:48 +09:00
Damien Elmes
923b4d65e9 fix unhandled sync error
Thanks to Abdo:
https://forums.ankiweb.net/t/sync-anki-on-desktop-error/6299/2
2021-01-06 18:51:28 +10:00
David Allison
94382867d0 Fix "Sign Up" link location
String states "Sign Up", but currently points to the "Sign In" screen: https://ankiweb.net/account/login

c8a6d81fde/rslib/ftl/sync.ftl (L38-L42)
2020-10-04 18:14:49 +01:00
Damien Elmes
8729edffbb update to latest black 2020-08-31 13:29:28 +10:00
Damien Elmes
52a7fa36cd fix signup link 2020-08-25 13:29:02 +10:00
Damien Elmes
6be12d6f90 fix automatic logout on auth failure not working 2020-08-03 10:24:49 +10:00
Damien Elmes
976d42cc90 full sync terminates media sync; start it again afterwards
https://forums.ankiweb.net/t/media-files-not-downloaded-in-first-full-sync-v2-1-28/1198/3
2020-07-21 11:26:41 +10:00
Damien Elmes
baed2d8fa5 formatting 2020-07-16 13:55:53 +10:00
Damien Elmes
e471497bd2 add platform version back into sync metadata 2020-07-16 10:12:41 +10:00
Damien Elmes
4d9d51a2af lint fixes 2020-06-02 17:58:14 +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
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
f171f74dc3 unify sync error handling; handle interrupted 2020-06-01 13:57:10 +10:00
Damien Elmes
b552dfb986 add "immediate" progress back
on ops which we know are going to take time, it makes the interface
look more responsive to pop up the progress more quickly
2020-06-01 13:57:10 +10:00
Damien Elmes
9698cb4f22 update auto-sync code 2020-06-01 13:57:10 +10:00
Damien Elmes
03465173dd show server message if present 2020-06-01 13:57:10 +10:00
Damien Elmes
bbc14b88e4 progress bar tweaks 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
4d33b2d8f7 use qconnect everywhere, and fix some typing issues
a step towards check_untyped_defs in aqt, but there's still 100+
issues to resolve
2020-05-04 13:23:08 +10:00
Damien Elmes
3c7eabc51e add flag to skip downgrade on collection close
Disabled for now; when enabled it will allow faster collection
open and close in the normal case, while continuing to downgrade
when exporting or doing a full sync.

Also, when downgrading is disabled, the journal mode is no longer
changed back to delete.
2020-04-04 17:21:45 +10:00
Damien Elmes
0147d9e470 drop log= argument from Collection 2020-03-20 21:15:23 +10:00
Damien Elmes
ecab2da99e remove unused code 2020-02-17 08:40:16 +10:00
Damien Elmes
1ba2e30854 show spinner when media sync active, click to reveal dialog 2020-02-17 08:40:16 +10:00
Damien Elmes
d86b231c2b pass in a progress callback instead of http_data_did_[send|receive]
If a request is happening on a background thread, the GUI code
receiving requests on that thread can lead to a crash

Add-on downloading still to do.
2020-01-18 17:49:59 +10:00
Damien Elmes
8bad40152d remove _hook/_filter suffix 2020-01-15 16:53:24 +10:00
Damien Elmes
a38b5c1bb6 tweak the hook names in anki/
still a work in progress
2020-01-15 16:43:22 +10:00
Damien Elmes
32edb4522d migrate addHook/remHook calls 2020-01-15 13:49:26 +10:00
Damien Elmes
2a00e0a6b0 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00
Renamed from anki-qt/aqt/sync.py (Browse further)