Don't fail if no cover
This commit is contained in:
parent
9f06d24602
commit
18ad2a25c0
1 changed files with 4 additions and 2 deletions
|
@ -133,8 +133,10 @@ func parseFile(epub *epubgo.Epub) map[string]interface{} {
|
||||||
title, _ := book["title"].(string)
|
title, _ := book["title"].(string)
|
||||||
book["file"] = nil
|
book["file"] = nil
|
||||||
cover, coverSmall := GetCover(epub, title)
|
cover, coverSmall := GetCover(epub, title)
|
||||||
|
if cover != "" {
|
||||||
book["cover"] = cover
|
book["cover"] = cover
|
||||||
book["coversmall"] = coverSmall
|
book["coversmall"] = coverSmall
|
||||||
|
}
|
||||||
book["keywords"] = keywords(book)
|
book["keywords"] = keywords(book)
|
||||||
return book
|
return book
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue