- paths = map(lambda bm: (None, bm.file.path), bm)
- return create_zip(paths, "%s_%s" % (self.slug, format_))
+ paths = map(lambda bm: (bm.get_nice_filename(), bm.file.path), bm)
+ licenses = set()
+ for m in bm:
+ license = constants.LICENSES.get(
+ m.get_extra_info_json().get('license'), {}
+ ).get('locative')
+ if license:
+ licenses.add(license)
+ readme = render_to_string('catalogue/audiobook_zip_readme.txt', {
+ 'licenses': licenses,
+ })
+ return create_zip(paths, "%s_%s" % (self.slug, format_), {'informacje.txt': readme})