mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-29 02:18:13 +00:00
Fixes openlibrary import to prefer editions with covers
This commit is contained in:
parent
62d3faa797
commit
c3d0e8e7f7
2 changed files with 2 additions and 2 deletions
|
@ -140,7 +140,7 @@ class AbstractConnector(AbstractMinimalConnector):
|
||||||
for author in self.get_authors_from_data(edition_data):
|
for author in self.get_authors_from_data(edition_data):
|
||||||
edition.authors.add(author)
|
edition.authors.add(author)
|
||||||
if not edition.authors.exists() and work.authors.exists():
|
if not edition.authors.exists() and work.authors.exists():
|
||||||
edition.authors.add(work.authors.all())
|
edition.authors.set(work.authors.all())
|
||||||
|
|
||||||
return edition
|
return edition
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ def pick_default_edition(options):
|
||||||
if len(options) == 1:
|
if len(options) == 1:
|
||||||
return options[0]
|
return options[0]
|
||||||
|
|
||||||
options = [e for e in options if e.get('cover')] or options
|
options = [e for e in options if e.get('covers')] or options
|
||||||
options = [e for e in options if \
|
options = [e for e in options if \
|
||||||
'/languages/eng' in str(e.get('languages'))] or options
|
'/languages/eng' in str(e.get('languages'))] or options
|
||||||
formats = ['paperback', 'hardcover', 'mass market paperback']
|
formats = ['paperback', 'hardcover', 'mass market paperback']
|
||||||
|
|
Loading…
Reference in a new issue