belaudiobooks / website

Catalog of belarusian audiobooks
GNU General Public License v3.0
32 stars 6 forks source link

Incorrect number of books on the main page #119

Closed nbeloglazov closed 10 months ago

nbeloglazov commented 10 months ago

The number of books on main page is rendered as 6 while in fact it's 100+: image

It got broken by the following commit: https://github.com/belaudiobooks/website/commit/7bff41315caf84ff29f10149f50efaf71429787a In that commit I optimized rendering performance of the main page. Previously we loaded all books and iterated through the first 6 books for rendering. Now we load only the first 6 books. We should count books be genres and pass it as a separate field to the page template.