forked from mirrors/bookwyrm
support both author field names
This commit is contained in:
parent
8c2552f739
commit
d40ff5c751
1 changed files with 2 additions and 2 deletions
|
@ -10,14 +10,14 @@ class StorygraphImporter(Importer):
|
||||||
|
|
||||||
service = "Storygraph"
|
service = "Storygraph"
|
||||||
# mandatory_fields : fields matching the book title and author
|
# mandatory_fields : fields matching the book title and author
|
||||||
mandatory_fields = ["Title", "Author"]
|
mandatory_fields = ["Title"]
|
||||||
|
|
||||||
def parse_fields(self, entry):
|
def parse_fields(self, entry):
|
||||||
"""custom parsing for storygraph"""
|
"""custom parsing for storygraph"""
|
||||||
data = {}
|
data = {}
|
||||||
data["import_source"] = self.service
|
data["import_source"] = self.service
|
||||||
data["Title"] = entry["Title"]
|
data["Title"] = entry["Title"]
|
||||||
data["Author"] = entry["Authors"]
|
data["Author"] = entry["Authors"] if "Authors" in entry else entry["Author"]
|
||||||
data["ISBN13"] = entry["ISBN"]
|
data["ISBN13"] = entry["ISBN"]
|
||||||
data["My Review"] = entry["Review"]
|
data["My Review"] = entry["Review"]
|
||||||
if entry["Star Rating"]:
|
if entry["Star Rating"]:
|
||||||
|
|
Loading…
Reference in a new issue