Damien Elmes
4c0f216df2
use media.trash for unused media deletion as well
2020-02-17 08:40:17 +10:00
Damien Elmes
4fc898ec1e
accept clicks on the progress dialog close button when updating
2020-02-17 08:40:17 +10:00
Damien Elmes
0c27126817
fix latex render progress; display more frequently
2020-02-17 08:40:17 +10:00
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
7f365faf3f
add extract_latex to backend; use it for latex build
2020-02-17 08:40:17 +10:00
Damien Elmes
79c1732b00
stripLatex() does not appear to be used anywhere
2020-02-17 08:40:17 +10:00
Damien Elmes
c890ef871e
include LaTeX png/svg files when checking for unused media
2020-02-17 08:40:17 +10:00
Damien Elmes
4cca3ecef5
files with leading underscore are ignored
2020-02-17 08:40:17 +10:00
Damien Elmes
9913dcd5dc
include normalized filenames in the rename list
...
Since they'll need to be uploaded on the next sync, better not to
hide them from the list
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
c1939aebd1
when adding hash suffix, need length in hex, not bytes
2020-02-17 08:40:17 +10:00
Damien Elmes
fabfcb0338
gather field references in Rust; media check now mostly complete
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
58da7988c3
catch trailing space/period as well
2020-02-17 08:40:17 +10:00
Damien Elmes
5ccdeb46b8
check [ instead of con in unit test, so test works on Windows as well
2020-02-17 08:40:17 +10:00
Damien Elmes
dad8108feb
run the TZ test only on Macs
2020-02-17 08:40:17 +10:00
Damien Elmes
87c73741d0
test shouldn't depend on dentry order
2020-02-17 08:40:17 +10:00
Damien Elmes
314e643140
expire media trash after a week
2020-02-17 08:40:17 +10:00
Damien Elmes
e9f51a694c
use our own trash folder instead of using the system trash
...
the trash crate was invoking external commands on Macs and Linux
which is slow and likely to fall over if a large number of files need
to be deleted at once.
2020-02-17 08:40:17 +10:00
Damien Elmes
660a9bf7ad
tidying
2020-02-17 08:40:17 +10:00
Damien Elmes
3350b4fa69
hold the DB open for the duration of the check
2020-02-17 08:40:17 +10:00
Damien Elmes
cee8d4b789
DB check
...
Working, but should be refactored so media DB not re-opened
each time a file is renamed.
2020-02-17 08:40:17 +10:00
Damien Elmes
8aa2984d04
factor entry code out for later
2020-02-17 08:40:17 +10:00
Damien Elmes
ce241f9756
mgr didn't need to be mutable
2020-02-17 08:40:17 +10:00
Damien Elmes
f7c26724f3
nfc helper
2020-02-17 08:40:17 +10:00
Damien Elmes
933b7a9a34
ignore 0 byte files when picking up changes
2020-02-17 08:40:17 +10:00
Damien Elmes
4fa4a5077c
don't add non-normalized files to media DB
2020-02-17 08:40:17 +10:00
Damien Elmes
22793c8cd6
media table doesn't need rowid
2020-02-17 08:40:17 +10:00
Damien Elmes
1ca11e4268
dirty index doesn't need to cover false case
2020-02-17 08:40:17 +10:00
Damien Elmes
bf50f88540
handle read errors during zip build
2020-02-17 08:40:17 +10:00
Damien Elmes
eddf9fdc44
clean up invalid media DB entries on the fly, instead of requiring DB check
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
e5f9ed5a5b
move change tracking into separate file
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
4289f7a02a
move sync_media() into MediaManager
2020-02-17 08:40:17 +10:00
Damien Elmes
fb8f753d2d
update rslib version automatically
2020-02-17 08:40:17 +10:00
Damien Elmes
4c8ceeb809
remove duplicate method
2020-02-17 08:40:17 +10:00
Damien Elmes
32a3b5a020
tidy up sync.rs
2020-02-17 08:40:17 +10:00
Damien Elmes
9067bf98bd
handle concurrent modifications and ankiweb terminating early
2020-02-17 08:40:17 +10:00
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