elif field in ('mp3', 'ogg', 'daisy'):
media = []
- for m in book.medias.filter(type=''):
- files.append({
- 'url': m.file.get_absolute_url(),
+ for m in book.media.filter(type=field):
+ media.append({
+ 'url': m.file.url,
'size': m.file.size,
})
if media:
elif field == 'author':
obj[field] = ", ".join(t.name for t in book.tags.filter(category='author'))
+ elif field == 'parent':
+ obj[field] = book.parent_id
+
elif field in ('license', 'license_description', 'source_name',
'technical_editors', 'editors'):
f = extra_info.get(field)