Fix book lookup if OL ID exists
This commit is contained in:
@ -103,9 +103,14 @@ class Book(LongPlayScrobblableMixin):
|
|||||||
author_name = self.author.name
|
author_name = self.author.name
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
data = lookup_book_from_openlibrary(
|
if self.openlibrary_id:
|
||||||
str(self.title), author_name
|
data = lookup_book_from_openlibrary(
|
||||||
)
|
str(self.openlibrary_id)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
data = lookup_book_from_openlibrary(
|
||||||
|
str(self.title), author_name
|
||||||
|
)
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
logger.warn(f"Book not found in OL {self.title}")
|
logger.warn(f"Book not found in OL {self.title}")
|
||||||
|
|||||||
Reference in New Issue
Block a user