Don't show a colon if there is no author_text

If there is no author for a book, render just the title of the book.
This commit is contained in:
mattkatz 2024-04-14 04:55:45 -04:00
parent 8dc412c4cb
commit a0d15ccec0

View file

@ -188,7 +188,10 @@ class RssShelfFeed(Feed):
def item_title(self, item):
"""render the item title"""
authors = item.authors
authors.display_name = f"{item.author_text}:"
if item.author_text:
authors.display_name = f"{item.author_text}:"
else:
authors.description = ""
template = get_template("rss/title.html")
return template.render({"user": authors, "item_title": item.title}).strip()