fix issue in previous
This commit is contained in:
parent
b1c3e5c15f
commit
97f4702af1
@ -60,7 +60,7 @@ func (this *Thumbnailer) RenderFile_NoCache(absPath string) ([]byte, error) {
|
||||
extension := strings.ToLower(filepath.Ext(absPath))
|
||||
|
||||
switch extension {
|
||||
case "jpg", "jpeg":
|
||||
case ".jpg", ".jpeg":
|
||||
src, err := jpeg.Decode(fh)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -68,7 +68,7 @@ func (this *Thumbnailer) RenderFile_NoCache(absPath string) ([]byte, error) {
|
||||
|
||||
return this.RenderScaledImage(src)
|
||||
|
||||
case "png":
|
||||
case ".png":
|
||||
src, err := png.Decode(fh)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -76,7 +76,7 @@ func (this *Thumbnailer) RenderFile_NoCache(absPath string) ([]byte, error) {
|
||||
|
||||
return this.RenderScaledImage(src)
|
||||
|
||||
case "avi", "mkv", "mp4", "ogm", "wmv":
|
||||
case ".avi", ".mkv", ".mp4", ".ogm", ".wmv":
|
||||
return this.RenderScaledFfmpeg(absPath)
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user