amuse.git

commit 66f9c3aa9023ba5d3c0e3b9edab7bf7c67ddd3dd

Author: Adam <git@apiote.tk>

fix link to the book film is based on

 wikidata/book.go | 8 ++++++--


diff --git a/wikidata/book.go b/wikidata/book.go
index 2f3b2a1c61fd55efe44643a228cbb5915bf5d255..02eca1ff6577ec97fa32c55695ce30c2972a9463 100644
--- a/wikidata/book.go
+++ b/wikidata/book.go
@@ -108,9 +108,13 @@ 			if err != nil {
 				return gott.Tuple(args), err
 			}
 		}
+		bookId := id
+		if result["book"].Value != "" {
+			bookId = strings.Replace(result["book"].Value, "http://www.wikidata.org/entity/", "wd:", 1)
+		}
 		book := datastructure.Book{
-			Id:          id,
-			Uri:         "/books/" + id,
+			Id:          bookId,
+			Uri:         "/books/" + bookId,
 			Source:      []datastructure.Source{},
 			Title:       result["bookLabel"].Value,
 			Year:        year,