雷宇辰
a2604b80f5
Use anki.consts.SYNC_BASE instead of hardcoded url
...
Use `anki.consts.SYNC_BASE` instead of hardcoded url in function `MediaSyncer._endpoint`
2020-03-06 18:55:07 +08:00
Alan Du
a63c9e5a9a
Apply mypy improvements to aqt
2020-02-26 22:27:58 -05:00
Damien Elmes
0c49431719
FString -> TR
2020-02-27 12:25:19 +10:00
Damien Elmes
e439e8cdec
add string for media log title, and add button in prefs to access it
2020-02-27 12:22:24 +10:00
Damien Elmes
644670d0d6
return a localized error for all error kinds
...
some errors are not yet localized, but now the Python code
doesn't need to think about which property to use
2020-02-27 10:46:24 +10:00
Damien Elmes
4430c67069
rework Fluent handling
...
- all .ftl files for a language are concatenated into a single file
at build time
- all languages are included in the binary
- external ftl files placed in the ftl folder can override the
built-in definitions
- constants are automatically generated for each string key
- dropped the separate StringsGroup enum
2020-02-23 13:22:50 +10:00
Damien Elmes
d612aa0945
localize some error messages
2020-02-17 11:38:22 +10:00
Damien Elmes
67a741958c
use new i18n infrastructure for more media check / media sync strings
2020-02-17 10:18:20 +10:00
Damien Elmes
f6a881f950
pass progress back as translated string(s)
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
fdd850c0f0
add extra hook for media sync start/stop
2020-02-17 08:40:17 +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