Fix book lookup if OL ID exists

This commit is contained in:
2023-05-23 16:33:22 -04:00
parent 085c666c19
commit 6753c3717f

View File

@ -103,6 +103,11 @@ class Book(LongPlayScrobblableMixin):
author_name = self.author.name author_name = self.author.name
if not data: if not data:
if self.openlibrary_id:
data = lookup_book_from_openlibrary(
str(self.openlibrary_id)
)
else:
data = lookup_book_from_openlibrary( data = lookup_book_from_openlibrary(
str(self.title), author_name str(self.title), author_name
) )