diff --git a/src/lib.js b/src/lib.js index 74f427b..512b97d 100644 --- a/src/lib.js +++ b/src/lib.js @@ -103,6 +103,7 @@ self.generateThumbs = () => { case "audio/mpeg": case "audio/ogg": case "audio/flac": + case "audio/x-flac": case "image/gif": exec('ffmpegthumbnailer -i'+e.dest+' -s1024 -o'+thumbnail, (error) => { if(error) { diff --git a/src/websrv.js b/src/websrv.js index 732322f..a0c5210 100644 --- a/src/websrv.js +++ b/src/websrv.js @@ -69,7 +69,7 @@ function Websrv(tlib) { '.jpg': 'image/jpg', '.gif': 'image/gif', '.mp3': 'audio/mpeg', - '.flac': 'audio/flac', + '.flac': 'audio/x-flac', '.mp4': 'video/mp4', '.webm': 'video/webm', '.ogg': 'audio/ogg', @@ -126,6 +126,7 @@ function Websrv(tlib) { case "audio/mpeg": case "audio/ogg": case "audio/flac": + case "audio/x-flac": data.item = 'audio'; break; } @@ -180,6 +181,7 @@ function Websrv(tlib) { || contentType === "video/quicktime" || contentType === "audio/mpeg" || contentType === "audio/flac" + || contentType === "audio/x-flac" || contentType === "audio/ogg") && req.headers['range']) { fs.readFile(filePath, "binary", function(err, file) { if(typeof req.headers.range !== 'undefined') {