Skip to content

Commit 6156324

Browse files
authored
Merge pull request #361 from readium/V1.12.0
V1.12.0 merged
2 parents 417c047 + b9b225e commit 6156324

File tree

18 files changed

+648
-291
lines changed

18 files changed

+648
-291
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ debug
1010
*.lib
1111
*.exe
1212
*.yaml
13+
*.h
1314
!test/config.yaml
1415
**/manage/config.js
1516
frontend/manage/node_modules/*
1617
frontend/manage/dist/*
1718
frontend/manage/js/*
1819
frontend/manage/js/components/*
20+
license/user_key_prod.go
1921
*.map
2022
*.htpasswd
2123
lcpserver/test.sqllite

api/common_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
const (
2222
// DO NOT FORGET to update the version
23-
Software_Version = "1.10.0"
23+
Software_Version = "1.12.0"
2424

2525
ContentType_LCP_JSON = "application/vnd.readium.lcp.license.v1.0+json"
2626
ContentType_LSD_JSON = "application/vnd.readium.license.status.v1.0+json"

encrypt/notify_server.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ type CMSMsg struct {
4848
DatePublished string `json:"date_published"`
4949
Description string `json:"description"`
5050
CoverUrl string `json:"cover_url,omitempty"`
51-
Language []Coded `json:"language"`
52-
Publisher []Entity `json:"publisher"`
53-
Author []Entity `json:"author"`
54-
Category []Entity `json:"category"`
51+
Language []Coded `json:"language,omitempty"`
52+
Publisher []Entity `json:"publisher,omitempty"`
53+
Author []Entity `json:"author,omitempty"`
54+
Category []Entity `json:"category,omitempty"`
5555
}
5656

5757
// NotifyLCPServer notifies the License Server of the encryption of a publication
@@ -238,13 +238,19 @@ func NotifyCMS(pub Publication, notifyURL string, verbose bool) error {
238238
}
239239
var en Entity
240240
for _, en.Name = range pub.Publisher {
241-
msg.Publisher = append(msg.Publisher, en)
241+
if en.Name != "" {
242+
msg.Publisher = append(msg.Publisher, en)
243+
}
242244
}
243245
for _, en.Name = range pub.Author {
244-
msg.Author = append(msg.Author, en)
246+
if en.Name != "" {
247+
msg.Author = append(msg.Author, en)
248+
}
245249
}
246250
for _, en.Name = range pub.Subject {
247-
msg.Category = append(msg.Category, en)
251+
if en.Name != "" {
252+
msg.Category = append(msg.Category, en)
253+
}
248254
}
249255

250256
var req *http.Request

0 commit comments

Comments
 (0)