Anki/anki
Damien Elmes c59dd854fb add change detection
I removed the media database in an earlier commit, but it's now necessary
again as I decided to add native media syncing to AnkiWeb.

This time, the DB is stored in the media folder rather than with the deck.
This means we avoid sending it in a full sync, and makes deck backups faster.
The DB is a cache of file modtimes and checksums. When findChanges() is
called, the code checks to see which files were added, changed or deleted
since the last time, and updates the log of changes. Because the scanning step
and log retrieval is separate, it's possible to do the scanning in the
background if the need arises.

If the DB is deleted by the user, Anki will forget any deletions, and add all
the files back to the DB the next time it's accessed.

File changes are recorded as a delete + add.

media.addFile() could be optimized in the future to log media added manually
by the user, allowing us to skip the full directory scan in cases where the
only changes were manually added media.
2011-09-12 03:11:06 +09:00
..
importing initial work on sync refactor 2011-09-08 12:50:42 +09:00
template add [] to cloze 2011-04-29 11:43:06 +09:00
__init__.py prevent people from shooting themselves in the foot 2011-04-28 09:31:48 +09:00
cards.py track all reps & time on a per-day basis 2011-09-07 18:48:29 +09:00
consts.py add a new default for counts() 2011-09-07 19:11:37 +09:00
cram.py convert groups to json; use timestamp ids for all but default 2011-08-27 17:13:04 +09:00
db.py check python version and locale on load 2011-04-28 09:24:03 +09:00
deck.py drop syncName, fix leech unit test 2011-09-07 20:11:26 +09:00
errors.py initial work on sync refactor 2011-09-08 12:50:42 +09:00
exporting.py update license link 2011-04-28 09:24:01 +09:00
facts.py initial work on sync refactor 2011-09-08 12:50:42 +09:00
find.py move group code into a registry like models 2011-08-27 23:45:55 +09:00
groups.py initial work on sync refactor 2011-09-08 12:50:42 +09:00
hooks.py update license link 2011-04-28 09:24:01 +09:00
js.py add a pie graph, add average interval to ivls area 2011-04-28 09:24:00 +09:00
lang.py update license link 2011-04-28 09:24:01 +09:00
latex.py simplify media.py 2011-09-11 00:25:22 +09:00
media.py add change detection 2011-09-12 03:11:06 +09:00
models.py initial work on sync refactor 2011-09-08 12:50:42 +09:00
sched.py mod schema when rev order updated 2011-09-09 22:38:00 +09:00
sound.py centralize all tmp dir access 2011-04-28 09:24:03 +09:00
stats.py top level groups 2011-09-07 01:31:46 +09:00
stdmodels.py move models into the deck table 2011-08-27 22:27:09 +09:00
storage.py more unit tests, fix bugs 2011-09-09 22:34:50 +09:00
sync.py todo 2011-09-09 23:06:12 +09:00
tags.py initial work on sync refactor 2011-09-08 12:50:42 +09:00
utils.py add change detection 2011-09-12 03:11:06 +09:00