Damien Elmes
89626c1a72
use media.trash for unused media deletion as well
2020-02-17 08:40:17 +10:00
Damien Elmes
fc7c2fe187
accept clicks on the progress dialog close button when updating
2020-02-17 08:40:17 +10:00
Damien Elmes
7ce49cb1f8
fix latex render progress; display more frequently
2020-02-17 08:40:17 +10:00
Damien Elmes
71c2730244
rename aqt/media.py to mediacheck.py
2020-02-17 08:40:17 +10:00
Damien Elmes
c4d6d9480c
if latex fails to render in bulk, show the user the problem
2020-02-17 08:40:17 +10:00
Damien Elmes
625b5728cc
new render_all_latex() + gui button; remove some old code
2020-02-17 08:40:17 +10:00
Damien Elmes
d32e2fe6eb
add extract_latex to backend; use it for latex build
2020-02-17 08:40:17 +10:00
Damien Elmes
2c634f5163
stripLatex() does not appear to be used anywhere
2020-02-17 08:40:17 +10:00
Damien Elmes
d557312f73
include LaTeX png/svg files when checking for unused media
2020-02-17 08:40:17 +10:00
Damien Elmes
e3bd06ec85
files with leading underscore are ignored
2020-02-17 08:40:17 +10:00
Damien Elmes
9700acbf18
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
edbb23b0ce
sort media list
2020-02-17 08:40:17 +10:00
Damien Elmes
790f3c9f72
plug new media check in
2020-02-17 08:40:17 +10:00
Damien Elmes
3d5f6a40b2
when adding hash suffix, need length in hex, not bytes
2020-02-17 08:40:17 +10:00
Damien Elmes
92b76a5ba7
gather field references in Rust; media check now mostly complete
2020-02-17 08:40:17 +10:00
Damien Elmes
edf60b10d4
backend stores media folder/db locations; don't need to pass them in
2020-02-17 08:40:17 +10:00
Damien Elmes
46bb6f1b92
catch trailing space/period as well
2020-02-17 08:40:17 +10:00
Damien Elmes
09aecc12e8
check [ instead of con in unit test, so test works on Windows as well
2020-02-17 08:40:17 +10:00
Damien Elmes
64e017da9a
run the TZ test only on Macs
2020-02-17 08:40:17 +10:00
Damien Elmes
e1f817a258
test shouldn't depend on dentry order
2020-02-17 08:40:17 +10:00
Damien Elmes
0da393da81
expire media trash after a week
2020-02-17 08:40:17 +10:00
Damien Elmes
a0680553ea
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
27b783ac72
tidying
2020-02-17 08:40:17 +10:00
Damien Elmes
76a61b8adf
hold the DB open for the duration of the check
2020-02-17 08:40:17 +10:00
Damien Elmes
f1b0431cbd
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
5ec977c74b
factor entry code out for later
2020-02-17 08:40:17 +10:00
Damien Elmes
1ca15c10d6
mgr didn't need to be mutable
2020-02-17 08:40:17 +10:00
Damien Elmes
2d859df88f
nfc helper
2020-02-17 08:40:17 +10:00
Damien Elmes
7079063855
ignore 0 byte files when picking up changes
2020-02-17 08:40:17 +10:00
Damien Elmes
62924237d3
don't add non-normalized files to media DB
2020-02-17 08:40:17 +10:00
Damien Elmes
88ac38fc55
media table doesn't need rowid
2020-02-17 08:40:17 +10:00
Damien Elmes
51e5d4b792
dirty index doesn't need to cover false case
2020-02-17 08:40:17 +10:00
Damien Elmes
742ab59edb
handle read errors during zip build
2020-02-17 08:40:17 +10:00
Damien Elmes
ef522b235a
clean up invalid media DB entries on the fly, instead of requiring DB check
2020-02-17 08:40:17 +10:00
Damien Elmes
9c60f2c77e
log media DB change registration progress, and allow aborting it
2020-02-17 08:40:17 +10:00
Damien Elmes
8e31068f0a
move change tracking into separate file
2020-02-17 08:40:17 +10:00
Damien Elmes
ef14b1a96b
simplify code by accumulating stats at the source
2020-02-17 08:40:17 +10:00
Damien Elmes
b21d24f6e8
move sync_media() into MediaManager
2020-02-17 08:40:17 +10:00
Damien Elmes
a769fb6172
update rslib version automatically
2020-02-17 08:40:17 +10:00
Damien Elmes
b62819092a
remove duplicate method
2020-02-17 08:40:17 +10:00
Damien Elmes
e352a6b95c
tidy up sync.rs
2020-02-17 08:40:17 +10:00
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