fix issue in previous

This commit is contained in:
mappu 2016-12-05 19:05:35 +13:00
parent b1c3e5c15f
commit 97f4702af1

View File

@ -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: