fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mobileinit parent fix
[wolnelektury.git]
/
apps
/
api
/
handlers.py
diff --git
a/apps/api/handlers.py
b/apps/api/handlers.py
index
832f34f
..
706e0cd
100644
(file)
--- a/
apps/api/handlers.py
+++ b/
apps/api/handlers.py
@@
-67,8
+67,8
@@
class CatalogueHandler(BaseHandler):
elif field in ('mp3', 'ogg', 'daisy'):
media = []
for m in book.media.filter(type=field):
elif field in ('mp3', 'ogg', 'daisy'):
media = []
for m in book.media.filter(type=field):
-
files
.append({
- 'url': m.file.
get_absolute_url()
,
+
media
.append({
+ 'url': m.file.
url
,
'size': m.file.size,
})
if media:
'size': m.file.size,
})
if media:
@@
-83,6
+83,9
@@
class CatalogueHandler(BaseHandler):
elif field == 'author':
obj[field] = ", ".join(t.name for t in book.tags.filter(category='author'))
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)
elif field in ('license', 'license_description', 'source_name',
'technical_editors', 'editors'):
f = extra_info.get(field)