-def download_zip(request, format, slug=None):
- if format in Book.ebook_formats:
- url = Book.zip_format(format)
- elif format in ('mp3', 'ogg') and slug is not None:
+def download_zip(request, file_format=None, media_format=None, slug=None):
+ if file_format:
+ url = Book.zip_format(file_format)
+ elif media_format and slug is not None: