Commit Graph

219 Commits

Author SHA1 Message Date
Damien Elmes
49cda5ffbb rename aqt/media.py to mediacheck.py 2020-02-17 08:40:17 +10:00
Damien Elmes
2d0499580f if latex fails to render in bulk, show the user the problem 2020-02-17 08:40:17 +10:00
Damien Elmes
9df2a08cb0 new render_all_latex() + gui button; remove some old code 2020-02-17 08:40:17 +10:00
Damien Elmes
c347c9aee8 sort media list 2020-02-17 08:40:17 +10:00
Damien Elmes
6f158c8555 plug new media check in 2020-02-17 08:40:17 +10:00
Damien Elmes
aa832e9117 backend stores media folder/db locations; don't need to pass them in 2020-02-17 08:40:17 +10:00
Damien Elmes
7ae6244f6a log media DB change registration progress, and allow aborting it 2020-02-17 08:40:17 +10:00
Damien Elmes
5fe1bfc5b4 simplify code by accumulating stats at the source 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
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
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
4096d21c07 add add_file() and write_data() 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
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
f7ebb8c28f
Merge pull request #433 from Arthur-Milchior/ints
Constants
2020-02-14 08:37:31 +10:00
ijgnd
d0ea2ad749
small fix: store return value for hook in preview 2020-02-13 18:51:11 +01:00
Glutanimate
c86e55d451 Fix "js" parameter type 2020-02-12 22:20:30 +01:00
Glutanimate
c839cda19f Fix missing "Optional" import and lint 2020-02-12 22:15:44 +01:00
Glutanimate
5bd38ce0a5 Pass CardInfoDialog context to stdHtml 2020-02-12 22:12:45 +01:00
Glutanimate
bbd667b0ff Add webview_will_set_content hook & update supporting code accordingly 2020-02-12 22:00:13 +01:00
Glutanimate
df2a7b06ef Refactor web view title setting and add titles to all web views
Simplifies debugging web views
2020-02-12 21:03:11 +01:00
Damien Elmes
1c677bb9d4 night mode fix for find dupes screen 2020-02-12 08:28:33 +10:00
Damien Elmes
3425bee968 provide easy access to browser from preview/dupes handlers 2020-02-12 08:28:21 +10:00
Damien Elmes
2c4c8d4ab0 tweak wording 2020-02-12 08:14:16 +10:00
Arthur Milchior
a087d0e4c4 Adding export option in Browser 2020-02-11 10:50:59 -08:00
Arthur Milchior
617043f632 browser._exporting 2020-02-11 10:50:59 -08:00
Arthur Milchior
272db65f0a Replace list of deck by "Browser Selection" 2020-02-11 10:50:59 -08:00
Arthur Milchior
a6567da259 if cards are selected, default is apkg 2020-02-11 10:50:59 -08:00
Arthur Milchior
d8669835d8 aqt.exporter takes extra argument cid 2020-02-11 10:49:13 -08:00
Damien Elmes
af26922493 fix error when double-clicking open profile button
https://anki.tenderapp.com/discussions/ankidesktop/38670-bug-when-auto-sync-is-enabled-and-open-profile-button-is-double-clicked
2020-02-10 09:32:56 +10:00
Damien Elmes
072b64c819 work around HTML editor race condition on macOS
https://anki.tenderapp.com/discussions/beta-testing/1785-cant-see-html-boxes
2020-02-10 09:25:11 +10:00
Damien Elmes
7fcb6b5672 pass instance to webview_did_receive_js_message instead of string 2020-02-09 08:59:29 +10:00
Damien Elmes
5bd67509ae
Merge pull request #441 from Arthur-Milchior/hookRefreshOverview
Allow to change main window when overview/deckbrowser is shown
2020-02-09 08:02:41 +10:00
Arthur Milchior
75a8ef832b Allow to change main window when overview/deckbrowser is shown 2020-02-08 08:09:12 -08:00
Damien Elmes
c8b794e6cc formatting 2020-02-07 17:55:26 +10:00