Show custom title UI for fi: override (#523)

This commit is contained in:
calzoneman 2015-12-13 11:18:28 -08:00
parent 6f654b16b8
commit 176d4cb06f
2 changed files with 9 additions and 1 deletions

View file

@ -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 = $("<div/>")

View file

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