Commit graph

3131 commits

Author SHA1 Message Date
Damien Elmes
08eb9d70c8 handle concurrent modifications and ankiweb terminating early 2020-02-17 08:40:17 +10:00
Damien Elmes
3ee1d3f0da update dirmod as files added during sync 2020-02-17 08:40:17 +10:00
Damien Elmes
a98889f69e set deployment target on Mac builds 2020-02-17 08:40:17 +10:00
Damien Elmes
775c83e89a add debug line 2020-02-17 08:40:17 +10:00
Damien Elmes
00cd3be1a0 fix force_resync() 2020-02-17 08:40:17 +10:00
Damien Elmes
c0e7975fe7 rename non-normalized filenames when downloading 2020-02-17 08:40:17 +10:00
Damien Elmes
2c27c11584 comply with manylinux wheel requirements, and vendor sqlite on Windows 2020-02-17 08:40:17 +10:00
Damien Elmes
1f931a5b78 defer errors on upload to media check 2020-02-17 08:40:17 +10:00
Damien Elmes
469798f523 autosync media every ~15 minutes 2020-02-17 08:40:17 +10:00
Damien Elmes
14cb7357fb autosync media on close 2020-02-17 08:40:17 +10:00
Damien Elmes
728e71f589 autosync media on startup 2020-02-17 08:40:17 +10:00
Damien Elmes
e9884a4b14 add extra hook for media sync start/stop 2020-02-17 08:40:17 +10:00
Damien Elmes
2cecae4ca7 add proper version 2020-02-17 08:40:16 +10:00
Damien Elmes
5835a68f47 if toolbar refreshed, make sure not to clear syncing 2020-02-17 08:40:16 +10:00
Damien Elmes
77158760ff use enums for some common errors 2020-02-17 08:40:16 +10:00
Damien Elmes
85b5c26930 catch DB errors in sync 2020-02-17 08:40:16 +10:00
Damien Elmes
bd14e30f63 constant sync spin speed 2020-02-17 08:40:16 +10:00
Damien Elmes
81262ffd95 defer media DB load until media action performed
This means a corrupt media DB will not prevent collection load.
2020-02-17 08:40:16 +10:00
Damien Elmes
b883b09414 pass in endpoint 2020-02-17 08:40:16 +10:00
Damien Elmes
c489b6b7ac catch network errors 2020-02-17 08:40:16 +10:00
Damien Elmes
c02a490be0 move more logic into mediasync.py, handle auth errors 2020-02-17 08:40:16 +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
738e415463 connect media sync progress to Python, add a progress dialog 2020-02-17 08:40:16 +10:00
Damien Elmes
50d8a40e23 add progress hook to media sync 2020-02-17 08:40:16 +10:00
Damien Elmes
804432fb3e use separate fn to init backend, for future pyo3 0.9 release compat 2020-02-17 08:40:16 +10:00
Damien Elmes
e26ab9073b send removed files to the trash
The way the trash crate implements deletion on a Mac is ugly, and
we may need to look into alternatives.
2020-02-17 08:40:16 +10:00
Damien Elmes
e764e68324 store sync state in a struct, and reuse ctx across methods 2020-02-17 08:40:16 +10:00
Damien Elmes
78bfbef863 media sync working, but unpolished 2020-02-17 08:40:16 +10:00
Damien Elmes
b2b8370477 bump nightly for the unwrap source line fix 2020-02-17 08:40:16 +10:00
Damien Elmes
973d8c56d6 more refactoring 2020-02-17 08:40:16 +10:00
Damien Elmes
7430d3c64f rearrange some methods to make structure clearer 2020-02-17 08:40:16 +10:00
Damien Elmes
1acb3b86b9 backend init can now fail, and update media db when file is added
- Adding files inside Anki now updates the media DB, so a full file
scan at sync time is no longer required if no other changes have been
made.
- Use a protobuf message for backend initialization, and return a
string error if initialization fails.
2020-02-17 08:40:16 +10:00
Damien Elmes
6bf4b9e83e port change tracking 2020-02-17 08:40:16 +10:00
Damien Elmes
4f08ae9e27 make sure results are checked 2020-02-17 08:40:16 +10:00
Damien Elmes
9bc38647e6 initial rs implementation of media database 2020-02-17 08:40:16 +10:00
Damien Elmes
05e269e20f run rs checks before setting up py env 2020-02-17 08:40:16 +10:00
Damien Elmes
9a280897d3 drop support for vfat 2020-02-17 08:40:16 +10:00
Damien Elmes
c8ea895cae drop support for the early 2.0 release media db format 2020-02-17 08:40:16 +10:00
Damien Elmes
1102983a4e drop the clean* funcs 2020-02-17 08:40:16 +10:00
Damien Elmes
c9a5ed3cc6 add add_file() and write_data() 2020-02-17 08:40:16 +10:00
Damien Elmes
9ec6d26db7 add another implementation of media.addFile() and cleanFilename() et al
Instead of adding an incrementing number in the conflict case,
the file hash is appended.
2020-02-17 08:40:16 +10:00
Damien Elmes
dee114df63 put head text after css/js imports so it can override them
as discussed in PR #438
2020-02-17 08:38:59 +10:00
Damien Elmes
2085bb1a99 bump version 2020-02-16 08:50:10 +10:00
Damien Elmes
415cb15661 Merge pull request #447 from glutanimate/browser-sidebar-tree-hooks
Add browser_will_build_tree filter
2020-02-16 08:36:28 +10:00
Damien Elmes
f6bad7b9c3 Merge pull request #445 from glutanimate/new-html-view-hooks-2
Allow add-on authors to easily inject their own content into Anki's web views – take 3
2020-02-16 08:32:34 +10:00
Glutanimate
b7e0d4388a Add browser_will_build_tree filter
Allows add-ons to populate the browser sidebar tree with their own
items, and/or take over specific construction stages in their
entirety
2020-02-15 21:03:15 +01:00
Glutanimate
356eda66f4 Update documentation for webview_will_set_content and WebContent 2020-02-15 15:03:58 +01:00
Glutanimate
28a394a074 Assume that web assets without a specified subpath are under /_anki
Maintains compatibility with existing add-ons
2020-02-15 15:03:43 +01:00
Damien Elmes
36393aa7a5 Merge pull request #444 from Arthur-Milchior/preFlushHooks
Pre flush hooks
2020-02-15 12:39:15 +10:00