From 09fe6b8b63cb16e71a05b7b9480ef46d34009456 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Sat, 10 Jul 2021 03:39:52 +0200 Subject: schema: prefer isbn13 --- skate/schema.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skate/schema.go b/skate/schema.go index 2d90735..0fd429f 100644 --- a/skate/schema.go +++ b/skate/schema.go @@ -190,7 +190,11 @@ func ReleaseToUnstructured(r *Release) string { if buf.Len() > 0 { fmt.Fprintf(&buf, ", ") } - fmt.Fprintf(&buf, `%s`, r.ExtIDs.ISBN[0]) + if isbn13, err := isbn.To13(r.ExtIDs.ISBN[0]); err == nil { + fmt.Fprintf(&buf, `%s`, isbn13) + } else { + fmt.Fprintf(&buf, `%s`, r.ExtIDs.ISBN[0]) + } } return buf.String() } -- cgit v1.2.3