- # WTF: was outside if, overwriting value assigned if shelf_is_set
- related_book_tags = get_top_level_related_tags(tags)
-
- if audiobooks:
- if objects != all_books:
- all_books = all_books.filter(media__type__in=('mp3', 'ogg')).distinct()
- objects = objects.filter(media__type__in=('mp3', 'ogg')).distinct()
+ related_book_tags = Tag.objects.usage_for_queryset(
+ objects, counts=True).exclude(
+ category='set').exclude(pk__in=tags_pks)