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+='