From bdce71e44780e5d0cc10f182415f711c6ca19135 Mon Sep 17 00:00:00 2001 From: Moe Date: Mon, 18 Jun 2018 23:39:30 -0700 Subject: [PATCH] useUTC fixes, SQLite with UTC changes fix ++ --- web/libs/js/main.dash2.js | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/web/libs/js/main.dash2.js b/web/libs/js/main.dash2.js index 300cc7f7..fa942a46 100644 --- a/web/libs/js/main.dash2.js +++ b/web/libs/js/main.dash2.js @@ -159,6 +159,18 @@ switch($user.details.lang){ } return url break; + case'videoUrlBuild': + var url + if(d.href){ + url = d.href + }else if(!d.href && d.hrefNoAuth){ + url = $.ccio.init('location',user)+user.auth_token+d.hrefNoAuth + } + if(user!==$user&&url.charAt(0)==='/'){ + url = $.ccio.init('location',user)+d.href.substring(1) + } + return url + break; case'videoHrefToDelete': var urlSplit = d.split('?') var url = urlSplit[0]+'/delete' @@ -849,15 +861,7 @@ switch($user.details.lang){ if(d.id&&!d.mid){d.mid=d.id;} switch(x){ case 0://video - var url - if(d.href){ - url = d.href - }else if(!d.href && d.hrefNoAuth){ - url = $.ccio.init('location',user)+user.auth_token+d.hrefNoAuth - } - if(user!==$user&&url.charAt(0)==='/'){ - url = $.ccio.init('location',user)+d.href.substring(1) - } + var url = $.ccio.init('videoUrlBuild',d) href = 'href="'+url+'"' // if(!d.filename){d.filename=$.ccio.init('tf',d.time)+'.'+d.ext;} d.dlname=d.mid+'-'+d.filename; @@ -892,7 +896,7 @@ switch($user.details.lang){ ],function(n,v){ tmp+='
'+v.label+' :
' }) - tmp+=''; + tmp+='' tmp+='
'; tmp+='
'; tmp+='
'; @@ -1757,7 +1761,7 @@ $.ccio.globalWebsocket=function(d,user){ break; case'video_edit':case'video_archive': $.ccio.init('data-video',d) - d.e=$('[file="'+d.filename+'"][mid="'+d.mid+'"][ke="'+d.ke+'"][auth="'+user.auth_token+'"]'); + d.e=$('[file="'+d.filename+'"][mid="'+d.mid+'"][ke="'+d.ke+'"][auth="'+user.auth_token+'"],[data-file="'+d.filename+'"][data-mid="'+d.mid+'"][data-ke="'+d.ke+'"][data-auth="'+user.auth_token+'"]'); d.e.attr('status',d.status),d.e.attr('data-status',d.status); console.log(d) @@ -5114,7 +5118,7 @@ $('body') eventLimit: true, events:e.ar, eventClick:function(f){ - $('#temp').html('
').find('[video="launch"]').click(); + $('#temp').html('
').find('[video="launch"]').click(); $(this).css('border-color', 'red'); } }); @@ -5145,7 +5149,7 @@ $('body') e.tmp+=''; $.each(d.videos,function(n,v){ if(v.status!==0){ - var href = $.ccio.init('location',user)+v.href + var href = $.ccio.init('videoUrlBuild',v) v.mon=$.ccio.mon[v.ke+v.mid+user.auth_token]; v.start=v.time; // v.filename=$.ccio.init('tf',v.time)+'.'+v.ext;