Commit Graph

3231 Commits

Author SHA1 Message Date
Damien Elmes
e0511c560b update dirmod as files added during sync 2020-02-17 08:40:17 +10:00
Damien Elmes
93ddc749c0 set deployment target on Mac builds 2020-02-17 08:40:17 +10:00
Damien Elmes
631bdc2a1e add debug line 2020-02-17 08:40:17 +10:00
Damien Elmes
1f35ff0bd5 fix force_resync() 2020-02-17 08:40:17 +10:00
Damien Elmes
23f5c7cb9b rename non-normalized filenames when downloading 2020-02-17 08:40:17 +10:00
Damien Elmes
0fb70dab0f comply with manylinux wheel requirements, and vendor sqlite on Windows 2020-02-17 08:40:17 +10:00
Damien Elmes
98279add15 defer errors on upload to media check 2020-02-17 08:40:17 +10:00
Damien Elmes
d38c2c12d5 autosync media every ~15 minutes 2020-02-17 08:40:17 +10:00
Damien Elmes
12d009e503 autosync media on close 2020-02-17 08:40:17 +10:00
Damien Elmes
59a7993011 autosync media on startup 2020-02-17 08:40:17 +10:00
Damien Elmes
fdd850c0f0 add extra hook for media sync start/stop 2020-02-17 08:40:17 +10:00
Damien Elmes
0f7fc1e960 add proper version 2020-02-17 08:40:16 +10:00
Damien Elmes
de27cf2a63 if toolbar refreshed, make sure not to clear syncing 2020-02-17 08:40:16 +10:00
Damien Elmes
6a64c8dfcc use enums for some common errors 2020-02-17 08:40:16 +10:00
Damien Elmes
c329759a88 catch DB errors in sync 2020-02-17 08:40:16 +10:00
Damien Elmes
d7e4d10184 constant sync spin speed 2020-02-17 08:40:16 +10:00
Damien Elmes
8d97f862a4 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
ec9abf1ce5 pass in endpoint 2020-02-17 08:40:16 +10:00
Damien Elmes
0c124188cd catch network errors 2020-02-17 08:40:16 +10:00
Damien Elmes
93c768cab9 move more logic into mediasync.py, handle auth errors 2020-02-17 08:40:16 +10:00
Damien Elmes
347ac80086 remove unused code 2020-02-17 08:40:16 +10:00
Damien Elmes
cb0ce4146f show spinner when media sync active, click to reveal dialog 2020-02-17 08:40:16 +10:00
Damien Elmes
ea4de9a6de connect media sync progress to Python, add a progress dialog 2020-02-17 08:40:16 +10:00
Damien Elmes
c82cff3836 add progress hook to media sync 2020-02-17 08:40:16 +10:00
Damien Elmes
00f431d94e use separate fn to init backend, for future pyo3 0.9 release compat 2020-02-17 08:40:16 +10:00
Damien Elmes
d0ee95c4cd 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
5e5906f183 store sync state in a struct, and reuse ctx across methods 2020-02-17 08:40:16 +10:00
Damien Elmes
f20b5b8db6 media sync working, but unpolished 2020-02-17 08:40:16 +10:00
Damien Elmes
1974981b94 bump nightly for the unwrap source line fix 2020-02-17 08:40:16 +10:00
Damien Elmes
ec8a91b493 more refactoring 2020-02-17 08:40:16 +10:00
Damien Elmes
10f64d54b8 rearrange some methods to make structure clearer 2020-02-17 08:40:16 +10:00
Damien Elmes
01470c4854 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
96f0a5cc3c port change tracking 2020-02-17 08:40:16 +10:00
Damien Elmes
7d42da67c6 make sure results are checked 2020-02-17 08:40:16 +10:00
Damien Elmes
056c2d3fd1 initial rs implementation of media database 2020-02-17 08:40:16 +10:00
Damien Elmes
c29faa9d86 run rs checks before setting up py env 2020-02-17 08:40:16 +10:00
Damien Elmes
d94a86930f drop support for vfat 2020-02-17 08:40:16 +10:00
Damien Elmes
e5f2e0df92 drop support for the early 2.0 release media db format 2020-02-17 08:40:16 +10:00
Damien Elmes
78f20d05a9 drop the clean* funcs 2020-02-17 08:40:16 +10:00
Damien Elmes
4096d21c07 add add_file() and write_data() 2020-02-17 08:40:16 +10:00
Damien Elmes
41266f46f1 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
57b678a939 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
Glutanimate
d02de28f21 Add deck_browser_will_render_section hook
Allows add-on authors to specifcally target and modify individual
sections of the deck browser HTML body at string composition time.
2020-02-16 19:29:01 +01:00
Damien Elmes
7894ab3312 bump version 2020-02-16 08:50:10 +10:00
Damien Elmes
0ec3bbe1af
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
990a6c394b
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
a8aac761f1 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
3637f466b4 Update documentation for webview_will_set_content and WebContent 2020-02-15 15:03:58 +01:00
Glutanimate
0e5dea4c9f 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
735c3542e1
Merge pull request #444 from Arthur-Milchior/preFlushHooks
Pre flush hooks
2020-02-15 12:39:15 +10:00