mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-20 16:25:01 +01:00
...
This commit is contained in:
parent
39798e6a5c
commit
efb44686db
1 changed files with 6 additions and 1 deletions
|
|
@ -56,6 +56,8 @@ def __init__(self):
|
|||
def add_routes(self, connect):
|
||||
base_href = '/ajax'
|
||||
connect('ajax_book', base_href+'/book/{book_id}', self.ajax_book)
|
||||
connect('ajax_categories', base_href+'/categories',
|
||||
self.ajax_categories)
|
||||
|
||||
# Get book metadata {{{
|
||||
@Endpoint()
|
||||
|
|
@ -85,7 +87,7 @@ def absurl(url):
|
|||
|
||||
data['cover'] = absurl(u'/get/cover/%d'%book_id)
|
||||
data['thumbnail'] = absurl(u'/get/thumb/%d'%book_id)
|
||||
mi.format_metadata = {k:dict(v) for k, v in
|
||||
mi.format_metadata = {k.lower():dict(v) for k, v in
|
||||
mi.format_metadata.iteritems()}
|
||||
for v in mi.format_metadata.itervalues():
|
||||
mtime = v.get('mtime', None)
|
||||
|
|
@ -112,3 +114,6 @@ def absurl(url):
|
|||
return data
|
||||
# }}}
|
||||
|
||||
@Endpoint()
|
||||
def ajax_categories(self):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue