X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ac21bdd330d4f33ec70509695f55bf65d8af0427..7583035c199c378c8d019937d155992709536b91:/apps/api/handlers.py?ds=sidebyside diff --git a/apps/api/handlers.py b/apps/api/handlers.py index e04710f32..dbe905b00 100644 --- a/apps/api/handlers.py +++ b/apps/api/handlers.py @@ -138,7 +138,7 @@ class BookDetails(object): @classmethod def cover_thumb(cls, book): return MEDIA_BASE + default.backend.get_thumbnail( - book.cover, "139x193").url + book.cover, "139x193").url if book.cover else '' @@ -230,6 +230,10 @@ class BooksHandler(BookDetailHandler): return rc.NOT_FOUND +class EBooksHandler(AnonymousBooksHandler): + fields = ('author', 'href', 'title', 'cover') + tuple(Book.ebook_formats) + + # add categorized tags fields for Book def _tags_getter(category): @classmethod