mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
export all _foo media in apkg export
This commit is contained in:
parent
267b7b0035
commit
b8c2110cb0
1 changed files with 4 additions and 1 deletions
|
@ -192,14 +192,17 @@ class AnkiExporter(Exporter):
|
|||
self.dst.decks.updateConf(dc)
|
||||
# find used media
|
||||
media = {}
|
||||
self.mediaDir = self.src.media.dir()
|
||||
if self.includeMedia:
|
||||
for row in notedata:
|
||||
flds = row[6]
|
||||
mid = row[2]
|
||||
for file in self.src.media.filesInStr(mid, flds):
|
||||
media[file] = True
|
||||
for fname in os.listdir(self.mediaDir):
|
||||
if fname.startswith("_"):
|
||||
media[fname] = True
|
||||
self.mediaFiles = media.keys()
|
||||
self.mediaDir = self.src.media.dir()
|
||||
self.dst.crt = self.src.crt
|
||||
# todo: tags?
|
||||
self.count = self.dst.cardCount()
|
||||
|
|
Loading…
Reference in a new issue