Skip to content

Commit

Permalink
auto generate text files should only trigger with missing thumbnail.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Sep 17, 2024
1 parent 3f8cbea commit 3395733
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions handler/app/dirs.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ func (dir Dirs) updateMagics(db *sql.DB, logger *zap.SugaredLogger,
Preview: dir.Preview,
Thumbnail: dir.Thumbnail,
}
if helper.File(filepath.Join(dirs.Thumbnail, uid+".png")) ||
helper.File(filepath.Join(dirs.Thumbnail, uid+".webp")) {
return data
}
if err := dirs.TextImager(logger, name, uid); err != nil {
logger.Error(errorWithID(err, "text imager", uid))
}
Expand Down

0 comments on commit 3395733

Please sign in to comment.