diff --git a/lsp/minified.js b/lsp/minified.js index d5a91b67..ece64200 100644 --- a/lsp/minified.js +++ b/lsp/minified.js @@ -86,9 +86,9 @@ var k=function(){function a(c){var b=mist.data.capabilities.connectors[c.connect var o={},x=[];for(q in mist.data.capabilities.connectors)x.push([q,q]);var V=$("");d.append(UI.buildUI([{label:"Protocol",type:"select",select:x,"function":function(){V.html(F($(this).getval()))}}])).append(V)}break;case "Streams":if(!("capabilities"in mist.data)){d.html("Loading..");mist.send(function(){UI.navto(a)},{capabilities:!0});break}h=$("").append($("").append("").attr("colspan",6).text("Loading.."));e=$("").html($("").html($("").html($("").data("index",d).html($("").data("index",d).html($("
").text("Stream name").attr("data-sort-type", "string").addClass("sorting-asc")).append($("").text("Source").attr("data-sort-type","string")).append($("").text("Status").attr("data-sort-type","int")).append($("").css("text-align","right").text("Connections").attr("data-sort-type","int")).append($("")).append($("")))).append(h);d.append(UI.buildUI([{type:"help",help:"Here you can create, edit or delete new and existing streams. Immidiately go to the stream preview or view the information available about the stream with the info button."}])).append($("").css("text-align","right").html($("").addClass("description").text("Loading..")),g=0;if(typeof mist.data.totals!="undefined"&&typeof mist.data.totals[d]!="undefined"){var t=mist.data.totals[d].all_protocols.clients,g=0;if(t.length){for(a in t)g=g+t[a][1];g=Math.round(g/t.length)}}f.html(UI.format.number(g));if(g==0&&e.online==1)e.online=2;g=$("").css("text-align","right").css("white-space","nowrap");(!("ischild"in e)|| -!e.ischild)&&g.html($("
").html(t).attr("title",d).addClass("overflow_ellipsis")).append($("").text(e.source).attr("title",e.source).addClass("description").addClass("overflow_ellipsis").css("max-width","20em")).append($("").data("sort-value",e.online).html(i)).append(f).append($("").html(j)).append(g)); +c[b],e;e=d in mist.data.streams?mist.data.streams[d]:z[d];var f=$("").css("text-align","right").html($("").addClass("description").text("Loading..")),t=0;if(typeof mist.data.totals!="undefined"&&typeof mist.data.totals[d]!="undefined"){var g=mist.data.totals[d].all_protocols.clients,t=0;if(g.length){for(a in g)t=t+g[a][1];t=Math.round(t/g.length)}}f.html(UI.format.number(t));if(t==0&&e.online==1)e.online=2;t=$("").css("text-align","right").css("white-space","nowrap");(!("ischild"in e)|| +!e.ischild)&&t.html($("
").html(g).attr("title",d).addClass("overflow_ellipsis")).append($("").text(e.source).attr("title",e.source).addClass("description").addClass("overflow_ellipsis").css("max-width","20em")).append($("").data("sort-value",e.online).html(i)).append(f).append($("").html(j)).append(t)); a++}},{totals:a,active_streams:true})},z=$.extend(!0,{},mist.data.streams),W=function(a,c){var b=$.extend({},c);delete b.meta;delete b.error;b.online=2;b.name=a;b.ischild=true;return b};if(mist.data.LTS){var C=0,G=0;for(l in mist.data.streams)r=mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"],mist.inputMatch(r.source_match,mist.data.streams[l].source)&&(z[l].source+="*",mist.send(function(a,c){var b=c.stream,d;for(d in a.browse.files)for(var e in mist.data.capabilities.inputs)if(!(e.indexOf("Buffer")>= 0||e.indexOf("Folder")>=0)&&mist.inputMatch(mist.data.capabilities.inputs[e].source_match,"/"+a.browse.files[d])){var f=b+"+"+a.browse.files[d];z[f]=W(f,mist.data.streams[b]);z[f].source=mist.data.streams[b].source+a.browse.files[d]}"files"in a.browse&&a.browse.files.length?z[b].filesfound=true:mist.data.streams[b].filesfound=false;G++;if(C==G){mist.send(function(){E()},{active_streams:true});UI.interval.set(function(){E()},1E4)}},{browse:mist.data.streams[l].source},{stream:l}),C++);0==C&&(mist.send(function(){E()}, {active_streams:!0}),UI.interval.set(function(){E()},3E4))}else mist.send(function(){E()},{active_streams:!0}),UI.interval.set(function(){E()},1E4);break;case "Edit Stream":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a,c)},{capabilities:!0});d.append("Loading..");break}j=!1;""!=c&&(j=!0);j?(l=c,o=mist.data.streams[l],d.find("h2").append(' "'+l+'"')):(d.html($("

").text("New Stream")),o={});l=[];for(q in mist.data.capabilities.inputs)l.push(mist.data.capabilities.inputs[q].source_match); @@ -98,34 +98,33 @@ o);J.append(UI.buildUI(a))}}}},$("
"),{type:"custom",custom:J},$("
"),$("< index:"contentkey"}},{type:"text",text:" - or - "},{label:"Key ID",type:"str",LTSonly:!0,pointer:{main:o,index:"keyid"}},{label:"Key seed",type:"str",LTSonly:!0,pointer:{main:o,index:"keyseed"}},{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Streams")}},{type:"save",label:"Save","function":function(){if(!mist.data.streams)mist.data.streams={};mist.data.streams[o.name]=o;c!=o.name&&delete mist.data.streams[c];var a={};if(mist.data.LTS){a.addstream={};a.addstream[o.name]= o;if(c!=o.name)a.deletestream=[c]}else a.streams=mist.data.streams;mist.send(function(){delete mist.data.streams[o.name].online;delete mist.data.streams[o.name].error;UI.navto("Streams")},a)}}]}]));break;case "Preview":if(""==c){d.append("Loading..");var N=function(c){var b={};c.sort();d.html($("

").text(a)).append(UI.buildUI([{label:"Select a stream",type:"select",select:c,pointer:{main:b,index:"stream"}},{type:"buttons",buttons:[{type:"save",label:"Go","function":function(){UI.navto(a,b.stream)}}]}])); UI.elements.secondary_menu.html("").append($("").addClass("button").addClass("active").text("Choose stream").click(function(){UI.navto("Preview")}));var e=$("
").addClass("preview_icons");d.append($("").addClass("description").text("Or, click a stream from the list below.")).append(e);for(var f in c){var g=c[f],h="";if(g.indexOf("+")>-1){h=g.split("+");h=mist.data.streams[h[0]].source+h[1]}else h=mist.data.streams[g].source;e.append($("