diff options
Diffstat (limited to 'skate/schema.go')
-rw-r--r-- | skate/schema.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/skate/schema.go b/skate/schema.go index d885728..54f796a 100644 --- a/skate/schema.go +++ b/skate/schema.go @@ -217,7 +217,8 @@ type Release struct { } `json:"rg,omitempty"` } `json:"skate,omitempty"` OpenLibrary struct { - HasFulltext bool `json:"has_fulltext,omitempty"` + HasFulltext bool `json:"has_fulltext,omitempty"` + WorkID string `json:"work,omitempty"` } `json:"ol,omitempty"` } `json:"extra,omitempty"` } @@ -563,6 +564,9 @@ func OpenLibraryEditionToRelease(v *OpenLibraryEdition, authorMap map[string]str } contribs[i].RawName = name } + if len(v.Works) > 0 { + release.Extra.OpenLibrary.WorkID = v.Works[0].Key + } release.Contribs = contribs release.Title = v.Title release.ExtIDs.ISBN = v.Isbns() |