mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-28 19:10:35 +00:00
Formats changes
This commit is contained in:
parent
05fcfbc66f
commit
ad8257f8bd
2 changed files with 3 additions and 3 deletions
|
@ -95,7 +95,7 @@ class Connector(AbstractConnector):
|
|||
url = "%s%s" % (self.base_url, author_id)
|
||||
yield self.get_or_create_author(url)
|
||||
|
||||
def get_cover_url(self, cover_blob, size='L'):
|
||||
def get_cover_url(self, cover_blob, size="L"):
|
||||
""" ask openlibrary for the cover """
|
||||
if not cover_blob:
|
||||
return None
|
||||
|
@ -111,7 +111,7 @@ class Connector(AbstractConnector):
|
|||
key = self.books_url + search_result["key"]
|
||||
author = search_result.get("author_name") or ["Unknown"]
|
||||
cover_blob = search_result.get("cover_i")
|
||||
cover = self.get_cover_url([cover_blob], size='M') if cover_blob else None
|
||||
cover = self.get_cover_url([cover_blob], size="M") if cover_blob else None
|
||||
return SearchResult(
|
||||
title=search_result.get("title"),
|
||||
key=key,
|
||||
|
|
|
@ -67,7 +67,7 @@ class Connector(AbstractConnector):
|
|||
if search_result.published_date
|
||||
else None,
|
||||
connector=self,
|
||||
cover='%s%s' % (self.covers_url, search_result.cover),
|
||||
cover="%s%s" % (self.covers_url, search_result.cover),
|
||||
confidence=search_result.rank if hasattr(search_result, "rank") else 1,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue