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 "video/quicktime":
case "audio/mpeg": case "audio/mpeg":
case "audio/ogg": case "audio/ogg":
case "audio/flac":
case "image/gif": case "image/gif":
exec('ffmpegthumbnailer -i'+e.dest+' -s1024 -o'+thumbnail, (error) => { exec('ffmpegthumbnailer -i'+e.dest+' -s1024 -o'+thumbnail, (error) => {
if(error) { if(error) {

View File

@ -69,6 +69,7 @@ function Websrv(tlib) {
'.jpg': 'image/jpg', '.jpg': 'image/jpg',
'.gif': 'image/gif', '.gif': 'image/gif',
'.mp3': 'audio/mpeg', '.mp3': 'audio/mpeg',
'.flac': 'audio/flac',
'.mp4': 'video/mp4', '.mp4': 'video/mp4',
'.webm': 'video/webm', '.webm': 'video/webm',
'.ogg': 'audio/ogg', '.ogg': 'audio/ogg',
@ -124,6 +125,7 @@ function Websrv(tlib) {
break; break;
case "audio/mpeg": case "audio/mpeg":
case "audio/ogg": case "audio/ogg":
case "audio/flac":
data.item = 'audio'; data.item = 'audio';
break; break;
} }
@ -177,6 +179,7 @@ function Websrv(tlib) {
|| contentType === "video/mp4" || contentType === "video/mp4"
|| contentType === "video/quicktime" || contentType === "video/quicktime"
|| contentType === "audio/mpeg" || contentType === "audio/mpeg"
|| contentType === "audio/flac"
|| contentType === "audio/ogg") && req.headers['range']) { || contentType === "audio/ogg") && req.headers['range']) {
fs.readFile(filePath, "binary", function(err, file) { fs.readFile(filePath, "binary", function(err, file) {
if(typeof req.headers.range !== 'undefined') { if(typeof req.headers.range !== 'undefined') {