Skip to content

Commit

Permalink
Improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
midstar committed Feb 23, 2019
1 parent 01327db commit b3180f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions media.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ func (m *Media) generateImageThumbnail(fullMediaPath, fullThumbPath string) erro
// 3. Generate a thumbnail to cache and write
// 4. If all above fails return error
func (m *Media) writeThumbnail(w io.Writer, relativeFilePath string) error {
if !m.isImage(relativeFilePath) && !m.isVideo(relativeFilePath) {
return fmt.Errorf("not a supported media type")
}
err := m.writeEXIFThumbnail(w, relativeFilePath)
if err != nil && m.enableThumbCache {
err = nil
Expand Down

0 comments on commit b3180f9

Please sign in to comment.