diff --git a/www/js/ui.js b/www/js/ui.js index ccc62dfe..5219aa85 100644 --- a/www/js/ui.js +++ b/www/js/ui.js @@ -447,7 +447,8 @@ $("#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)$/) || + url.match(/^fi:/)) { var title = $("#addfromurl-title"); if (title.length === 0) { title = $("
") diff --git a/www/js/util.js b/www/js/util.js index 7ddfa1fd..3d7a1ccd 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1336,6 +1336,13 @@ function parseMediaLink(url) { type: "dm" }; } + // Raw files need to keep the query string + if ((m = url.match(/^fi:(.*)/))) { + return { + id: m[1], + type: "fi" + }; + } // Generic for the rest. if ((m = url.match(/^([a-z]{2}):([^\?&#]+)/))) { return {