From d6ffc5c839c18003695eaf08205e4399c20bb78e Mon Sep 17 00:00:00 2001 From: RblSb Date: Sun, 7 Jun 2020 21:21:10 +0300 Subject: Hide iframes duration --- res/client.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'res/client.js') diff --git a/res/client.js b/res/client.js index 9bc4a2c..6b196b4 100644 --- a/res/client.js +++ b/res/client.js @@ -1879,7 +1879,8 @@ client_Player.prototype = { } ,addVideoItem: function(item,atEnd) { var url = StringTools.htmlEscape(item.url,true); - var itemEl = client_Utils.nodeFromString("
  • \n\t\t\t\t
    \n\t\t\t\t\t" + this.duration(item.duration) + "\n\t\t\t\t\t

    " + StringTools.htmlEscape(item.title) + "

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
  • "); + var duration = item.isIframe ? "" : this.duration(item.duration); + var itemEl = client_Utils.nodeFromString("
  • \n\t\t\t\t
    \n\t\t\t\t\t" + duration + "\n\t\t\t\t\t

    " + StringTools.htmlEscape(item.title) + "

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
  • "); VideoList.addItem(this.items,item,atEnd,this.itemPos); this.setItemElementType(itemEl,item.isTemp); if(atEnd) { @@ -2007,7 +2008,14 @@ client_Player.prototype = { var time = 0.0; var _g = 0; var _g1 = this.items; - while(_g < _g1.length) time += _g1[_g++].duration; + while(_g < _g1.length) { + var item = _g1[_g]; + ++_g; + if(item.isIframe) { + continue; + } + time += item.duration; + } return this.duration(time); } ,isListEmpty: function() { -- cgit v1.2.3