Loading opds_catalog/__pycache__/feeds.cpython-35.pyc +49 B (40.3 KiB) File changed.No diff preview for this file type. View original file View changed file opds_catalog/feeds.py +9 −4 Original line number Diff line number Diff line Loading @@ -641,7 +641,10 @@ class SearchSeriesFeed(AuthFeed): self.author_id = int(searchterms) except: self.author_id = None series = Series.objects.filter(book__authors=self.author_id).distinct() series = Series.objects.filter(book__authors=self.author_id) series = series.annotate(count_book=Count('book')).distinct() print(series.query) return {"series":series, "searchterms":searchterms, "searchtype":searchtype, "page":page} Loading Loading @@ -681,7 +684,9 @@ class SearchSeriesFeed(AuthFeed): return "%s"%(item.ser) def item_description(self, item): return _("Books count: %s")%(Book.objects.filter(series=item.id).count()) #count = Book.objects.filter(series=item.id).count() count = item.count_book return _("Books count: %s")%(count) def item_guid(self, item): return "a:%s"%(item.id) Loading Loading
opds_catalog/__pycache__/feeds.cpython-35.pyc +49 B (40.3 KiB) File changed.No diff preview for this file type. View original file View changed file
opds_catalog/feeds.py +9 −4 Original line number Diff line number Diff line Loading @@ -641,7 +641,10 @@ class SearchSeriesFeed(AuthFeed): self.author_id = int(searchterms) except: self.author_id = None series = Series.objects.filter(book__authors=self.author_id).distinct() series = Series.objects.filter(book__authors=self.author_id) series = series.annotate(count_book=Count('book')).distinct() print(series.query) return {"series":series, "searchterms":searchterms, "searchtype":searchtype, "page":page} Loading Loading @@ -681,7 +684,9 @@ class SearchSeriesFeed(AuthFeed): return "%s"%(item.ser) def item_description(self, item): return _("Books count: %s")%(Book.objects.filter(series=item.id).count()) #count = Book.objects.filter(series=item.id).count() count = item.count_book return _("Books count: %s")%(count) def item_guid(self, item): return "a:%s"%(item.id) Loading