when rebuilding field cache make sure we don't discard filenames
stripHTMLMedia() already used in notes.py
This commit is contained in:
parent
dfd23f6a41
commit
a28973c2aa
@ -14,7 +14,7 @@ import traceback
|
|||||||
|
|
||||||
from anki.lang import _, ngettext
|
from anki.lang import _, ngettext
|
||||||
from anki.utils import ids2str, fieldChecksum, stripHTML, \
|
from anki.utils import ids2str, fieldChecksum, stripHTML, \
|
||||||
intTime, splitFields, joinFields, maxID, json, devMode
|
intTime, splitFields, joinFields, maxID, json, devMode, stripHTMLMedia
|
||||||
from anki.hooks import runFilter, runHook
|
from anki.hooks import runFilter, runHook
|
||||||
from anki.models import ModelManager
|
from anki.models import ModelManager
|
||||||
from anki.media import MediaManager
|
from anki.media import MediaManager
|
||||||
@ -523,7 +523,7 @@ where c.nid = n.id and c.id in %s group by nid""" % ids2str(cids)):
|
|||||||
if not model:
|
if not model:
|
||||||
# note points to invalid model
|
# note points to invalid model
|
||||||
continue
|
continue
|
||||||
r.append((stripHTML(fields[self.models.sortIdx(model)]),
|
r.append((stripHTMLMedia(fields[self.models.sortIdx(model)]),
|
||||||
fieldChecksum(fields[0]),
|
fieldChecksum(fields[0]),
|
||||||
nid))
|
nid))
|
||||||
# apply, relying on calling code to bump usn+mod
|
# apply, relying on calling code to bump usn+mod
|
||||||
|
Loading…
Reference in New Issue
Block a user