spacko-flac bitches

This commit is contained in:
Flummi 2017-08-09 15:24:59 +02:00
parent 39aa8b1c1a
commit 7504c1752b
2 changed files with 4 additions and 1 deletions

View File

@ -103,6 +103,7 @@ self.generateThumbs = () => {
case "audio/mpeg": case "audio/mpeg":
case "audio/ogg": case "audio/ogg":
case "audio/flac": case "audio/flac":
case "audio/x-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,7 +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', '.flac': 'audio/x-flac',
'.mp4': 'video/mp4', '.mp4': 'video/mp4',
'.webm': 'video/webm', '.webm': 'video/webm',
'.ogg': 'audio/ogg', '.ogg': 'audio/ogg',
@ -126,6 +126,7 @@ function Websrv(tlib) {
case "audio/mpeg": case "audio/mpeg":
case "audio/ogg": case "audio/ogg":
case "audio/flac": case "audio/flac":
case "audio/x-flac":
data.item = 'audio'; data.item = 'audio';
break; break;
} }
@ -180,6 +181,7 @@ function Websrv(tlib) {
|| contentType === "video/quicktime" || contentType === "video/quicktime"
|| contentType === "audio/mpeg" || contentType === "audio/mpeg"
|| contentType === "audio/flac" || contentType === "audio/flac"
|| contentType === "audio/x-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') {