Detect cover images in subdirectories (#1144)

This commit is contained in:
WithoutPants
2021-03-04 10:52:45 +11:00
committed by GitHub
parent 16da483674
commit e5c5cde974
3 changed files with 36 additions and 1 deletions

View File

@@ -246,7 +246,7 @@ func Serve(w http.ResponseWriter, r *http.Request, path string) {
func IsCover(img *models.Image) bool {
_, fn := getFilePath(img.Path)
return fn == "cover.jpg"
return strings.HasSuffix(fn, "cover.jpg")
}
func GetTitle(s *models.Image) string {