mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -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)
|
self.dst.decks.updateConf(dc)
|
||||||
# find used media
|
# find used media
|
||||||
media = {}
|
media = {}
|
||||||
|
self.mediaDir = self.src.media.dir()
|
||||||
if self.includeMedia:
|
if self.includeMedia:
|
||||||
for row in notedata:
|
for row in notedata:
|
||||||
flds = row[6]
|
flds = row[6]
|
||||||
mid = row[2]
|
mid = row[2]
|
||||||
for file in self.src.media.filesInStr(mid, flds):
|
for file in self.src.media.filesInStr(mid, flds):
|
||||||
media[file] = True
|
media[file] = True
|
||||||
|
for fname in os.listdir(self.mediaDir):
|
||||||
|
if fname.startswith("_"):
|
||||||
|
media[fname] = True
|
||||||
self.mediaFiles = media.keys()
|
self.mediaFiles = media.keys()
|
||||||
self.mediaDir = self.src.media.dir()
|
|
||||||
self.dst.crt = self.src.crt
|
self.dst.crt = self.src.crt
|
||||||
# todo: tags?
|
# todo: tags?
|
||||||
self.count = self.dst.cardCount()
|
self.count = self.dst.cardCount()
|
||||||
|
|
Loading…
Reference in a new issue