Whitelist m4a/aac for ffmpeg

This commit is contained in:
Calvin Montgomery 2016-12-17 19:53:17 -08:00
parent 041d50cb23
commit d21943ecc7
6 changed files with 10 additions and 5 deletions

View file

@ -733,6 +733,8 @@
return 'audio/mp3';
case 'vorbis':
return 'audio/ogg';
case 'aac':
return 'audio/aac';
default:
return 'video/flv';
}

View file

@ -446,7 +446,7 @@ $("#mediaurl").keyup(function(ev) {
queue("end", "url");
} else {
var url = $("#mediaurl").val().split("?")[0];
if (url.match(/^https?:\/\/(.*)?\.(flv|mp4|og[gv]|webm|mp3|mov)$/) ||
if (url.match(/^https?:\/\/(.*)?\.(flv|mp4|og[gv]|webm|mp3|mov|m4a)$/) ||
url.match(/^fi:/)) {
var title = $("#addfromurl-title");
if (title.length === 0) {

View file

@ -1426,7 +1426,7 @@ function parseMediaLink(url) {
/* Raw file */
var tmp = url.split("?")[0];
if (tmp.match(/^https?:\/\//)) {
if (tmp.match(/\.(mp4|flv|webm|og[gv]|mp3|mov)$/)) {
if (tmp.match(/\.(mp4|flv|webm|og[gv]|mp3|mov|m4a)$/)) {
return {
id: url,
type: "fi"
@ -1435,8 +1435,9 @@ function parseMediaLink(url) {
Callbacks.queueFail({
link: url,
msg: "The file you are attempting to queue does not match the supported " +
"file extensions mp4, flv, webm, ogg, ogv, mp3, mov."
"file extensions mp4, flv, webm, ogg, ogv, mp3, mov, m4a."
});
// Lol I forgot about this hack
throw new Error("ERROR_QUEUE_UNSUPPORTED_EXTENSION");
}
}