mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
fix import of media
This commit is contained in:
parent
cc742df71a
commit
44457e78d2
1 changed files with 2 additions and 1 deletions
|
@ -391,7 +391,8 @@ def replaceWithApkg(mw, file, backup):
|
||||||
# unwanted media. in the future we might also want to deduplicate this
|
# unwanted media. in the future we might also want to deduplicate this
|
||||||
# step
|
# step
|
||||||
d = os.path.join(mw.pm.profileFolder(), "collection.media")
|
d = os.path.join(mw.pm.profileFolder(), "collection.media")
|
||||||
for n, (cStr, file) in enumerate(json.loads(z.read("media")).items()):
|
for n, (cStr, file) in enumerate(
|
||||||
|
json.loads(z.read("media").decode("utf8")).items()):
|
||||||
mw.progress.update(ngettext("Processed %d media file",
|
mw.progress.update(ngettext("Processed %d media file",
|
||||||
"Processed %d media files", n) % n)
|
"Processed %d media files", n) % n)
|
||||||
size = z.getinfo(cStr).file_size
|
size = z.getinfo(cStr).file_size
|
||||||
|
|
Loading…
Reference in a new issue