flac bitches

This commit is contained in:
Flummi 2017-08-09 15:20:55 +02:00
parent d4e3887148
commit 39aa8b1c1a
2 changed files with 4 additions and 0 deletions

View File

@ -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) {

View File

@ -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') {