Anki/anki
Damien Elmes 0c9672e7b8 rewrite media support
- media is no longer hashed, and instead stored in the db using its original
  name
- when adding media, its checksum is calculated and used to look for
  duplicates
- duplicate filenames will result in a number tacked on the file
- the size column is used to count card references to media. If media is
  referenced in a fact but not the question or answer, the count will be zero.
- there is no guarantee media will be listed in the media db if it is unused
  on the question & answer
- if rebuildMediaDir(delete=True), then entries with zero references are
  deleted, along with any unused files in the media dir.
- rebuildMediaDir() will update the internal checksums, and set the checksum
  to "" if a file can't be found
- rebuildMediaDir() is a lot less destructive now, and will leave alone
  directories it finds in the media folder (but not look in them either)
- rebuildMediaDir() returns more information about the state of media now
- the online and mobile clients will need to to make sure that when
  downloading media, entries with no checksum are non-fatal and should not
  abort the download process.
- the ref count is updated every time the q/a is updated - so the db should be
  up to date after every add/edit/import
- since we look for media on the q/a now, card templates like '<img
  src="{{{field}}}">' will work now
- export original files as gone as it is not needed anymore
- move from per-model media URL to deckVar. downloadMissingMedia() uses this
  now. Deck subscriptions will have to be updated to share media another way.
- pass deck in formatQA, as latex support is going to change
2010-12-11 01:19:31 +09:00
..
importing fix tag update 2010-12-08 17:05:19 +09:00
template convert pystache to private library since it doesn't behave like upstream 2010-11-29 22:51:55 +09:00
__init__.py rewrite media support 2010-12-11 01:19:31 +09:00
cards.py rewrite media support 2010-12-11 01:19:31 +09:00
db.py remove string exceptions for python2.6 2010-06-10 13:24:46 +09:00
deck.py rewrite media support 2010-12-11 01:19:31 +09:00
errors.py rename instance var to avoid deprecation warning 2009-04-29 15:28:13 +09:00
exporting.py more type handling updates; don't munge counts on sync 2010-11-13 18:39:24 +09:00
facts.py rewrite media support 2010-12-11 01:19:31 +09:00
fonts.py initial commit from hg 2008-09-27 23:50:03 +09:00
graphs.py don't fudge matplotlib path on win32 2010-11-26 21:59:09 +09:00
history.py fix reviewHistory table by rebuilding it 2009-03-15 07:27:44 +09:00
hooks.py new syncName handling 2010-11-23 23:12:34 +09:00
lang.py translation patches from Piotr 2009-01-20 23:33:50 +09:00
latex.py python2.7/win32 fix for latex 2010-11-12 13:05:43 +09:00
media.py rewrite media support 2010-12-11 01:19:31 +09:00
models.py rewrite media support 2010-12-11 01:19:31 +09:00
sound.py avoid passing the second fade argument, as it seems to be more robust 2010-11-16 18:04:04 +09:00
stats.py more type handling updates; don't munge counts on sync 2010-11-13 18:39:24 +09:00
stdmodels.py strip all chinese/japanese support out in favour of plugins 2009-06-10 22:58:28 +09:00
sync.py rewrite media support 2010-12-11 01:19:31 +09:00
tags.py don't create empty tags on export 2010-02-05 12:27:32 +09:00
utils.py don't allow tags to be prefixed with a colon, as this breaks sqlite 2010-11-26 03:49:01 +09:00