From 39aa8b1c1a74a0eebe47a16d89db2800170edcfe Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 9 Aug 2017 15:20:55 +0200 Subject: [PATCH] flac bitches --- src/lib.js | 1 + src/websrv.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/lib.js b/src/lib.js index 1f3c467..74f427b 100644 --- a/src/lib.js +++ b/src/lib.js @@ -102,6 +102,7 @@ self.generateThumbs = () => { case "video/quicktime": case "audio/mpeg": case "audio/ogg": + case "audio/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 bb3df8b..732322f 100644 --- a/src/websrv.js +++ b/src/websrv.js @@ -69,6 +69,7 @@ function Websrv(tlib) { '.jpg': 'image/jpg', '.gif': 'image/gif', '.mp3': 'audio/mpeg', + '.flac': 'audio/flac', '.mp4': 'video/mp4', '.webm': 'video/webm', '.ogg': 'audio/ogg', @@ -124,6 +125,7 @@ function Websrv(tlib) { break; case "audio/mpeg": case "audio/ogg": + case "audio/flac": data.item = 'audio'; break; } @@ -177,6 +179,7 @@ function Websrv(tlib) { || contentType === "video/mp4" || contentType === "video/quicktime" || contentType === "audio/mpeg" + || contentType === "audio/flac" || contentType === "audio/ogg") && req.headers['range']) { fs.readFile(filePath, "binary", function(err, file) { if(typeof req.headers.range !== 'undefined') {