previews: update epub urls in opds
authorJan Szejko <janek37@gmail.com>
Wed, 30 May 2018 14:12:21 +0000 (16:12 +0200)
committerJan Szejko <janek37@gmail.com>
Wed, 30 May 2018 14:12:21 +0000 (16:12 +0200)
src/opds/views.py

index 189ff0f..0c31cd2 100644 (file)
@@ -201,7 +201,7 @@ class AcquisitionFeed(Feed):
             return u''
 
     def item_enclosure_url(self, book):
             return u''
 
     def item_enclosure_url(self, book):
-        return full_url(book.epub_file.url) if book.epub_file else None
+        return full_url(book.epub_url()) if book.epub_file else None
 
     def item_enclosure_length(self, book):
         return book.epub_file.size if book.epub_file else None
 
     def item_enclosure_length(self, book):
         return book.epub_file.size if book.epub_file else None