X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/59e248d7a8f7994fdb456653c4a2898994457bd9..a462a0a83558dc5c2a1a1f6ed4bfa52be9f32b3e:/apps/catalogue/management/commands/importbooks.py diff --git a/apps/catalogue/management/commands/importbooks.py b/apps/catalogue/management/commands/importbooks.py index ee469ba9b..ffe0de8ec 100644 --- a/apps/catalogue/management/commands/importbooks.py +++ b/apps/catalogue/management/commands/importbooks.py @@ -87,6 +87,10 @@ class Command(BaseCommand): book.ogg_file.save('%s.ogg' % book.slug, File(file(os.path.join(dir_name, book.slug + '.ogg')))) if verbose: print "Importing %s.ogg" % book.slug + if os.path.isfile(os.path.join(dir_name, book.slug + '.daisy.zip')): + book.ogg_file.save('%s.daisy.zip' % book.slug, File(file(os.path.join(dir_name, book.slug + '.daisy.zip')))) + if verbose: + print "Importing %s.daisy.zip" % book.slug book.save()