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)
|
||||
book["file"] = nil
|
||||
cover, coverSmall := GetCover(epub, title)
|
||||
book["cover"] = cover
|
||||
book["coversmall"] = coverSmall
|
||||
if cover != "" {
|
||||
book["cover"] = cover
|
||||
book["coversmall"] = coverSmall
|
||||
}
|
||||
book["keywords"] = keywords(book)
|
||||
return book
|
||||
}
|
||||
|
|
Reference in a new issue