Got drag-n-drop to schedule working.
This commit is contained in:
parent
90be85de26
commit
85bbe39578
6 changed files with 152 additions and 47 deletions
|
|
@ -55,16 +55,22 @@ module.exports = class{
|
|||
async queueURL(socket, data){
|
||||
try{
|
||||
//Set url
|
||||
const url = encodeURI(data.url);
|
||||
var url = data.url;
|
||||
|
||||
//pull URL and start time from data
|
||||
//let {url, start, title} = data;
|
||||
//If we where given a bad URL
|
||||
if(!validator.isURL(url)){
|
||||
//Bitch, moan, complain...
|
||||
loggerUtils.socketErrorHandler(socket, "Bad URL!", "validation");
|
||||
//and ignore it!
|
||||
return;
|
||||
//Attempt to fix the situation by encoding it
|
||||
url = encodeURI(url);
|
||||
|
||||
//If it's still bad
|
||||
if(!validator.isURL(url)){
|
||||
//Bitch, moan, complain...
|
||||
loggerUtils.socketErrorHandler(socket, "Bad URL!", "validation");
|
||||
//and ignore it!
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//If the title is too long
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ module.exports.fetchMetadata = async function(link){
|
|||
|
||||
function compatibilityFilter(file){
|
||||
//return true for all files that match for web-safe formats
|
||||
return file.format == "h.264" || file.format == "Ogg Video" || file.format.match("MPEG4");
|
||||
return file.format == "h.264 IA" || file.format == "h.264" || file.format == "Ogg Video" || file.format.match("MPEG4");
|
||||
}
|
||||
|
||||
function pathFilter(file){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue