Skip to content

Commit

Permalink
Fix loan list for nameless books
Browse files Browse the repository at this point in the history
  • Loading branch information
Leseratte10 committed Feb 20, 2023
1 parent 93d732f commit a9519fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion calibre-plugin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,11 @@ def populate_list(self):

info = "(" + self.td_format(timestamp - currenttime) + " remaining)"

item = QListWidgetItem(book["book_name"] + " " + info)
book_name = book["book_name"]
if book_name is None:
book_name = "(unknown book)"

item = QListWidgetItem(book_name + " " + info)
item.setData(QtCore.Qt.UserRole, book["loanID"])
self.listy.addItem(item)

Expand Down

0 comments on commit a9519fb

Please sign in to comment.