diff --git a/preview.go b/preview.go index 9fbcf3b..ba9f76f 100644 --- a/preview.go +++ b/preview.go @@ -136,16 +136,15 @@ html, body { return } - if len(childIDs) == 0 { - log.Printf("Failed to parse album '%s': no entries in album", fileID) - http.Error(w, "Internal error", 500) - return + albumThumb := `/nothumb_340.png` + if len(childIDs) > 0 { + albumThumb = `/thumb/m/` + childIDs[0] } tmpl += `
- +
` + fmt.Sprintf("%d", len(childIDs)) + ` image(s)