aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-06-07 21:21:10 +0300
committerRblSb <msrblsb@gmail.com>2020-06-07 21:21:10 +0300
commitd6ffc5c839c18003695eaf08205e4399c20bb78e (patch)
tree5567b08c333da8cfd0c9f3dcf285c6111c9a309d /res
parentd31f0b30481f6180e7907aee27413e5d208539aa (diff)
Hide iframes duration
Diffstat (limited to 'res')
-rw-r--r--res/client.js12
1 files changed, 10 insertions, 2 deletions
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("<li class=\"queue_entry info\" title=\"" + Lang.get("addedBy") + ": " + item.author + "\">\n\t\t\t\t<header>\n\t\t\t\t\t<span class=\"qe_time\">" + this.duration(item.duration) + "</span>\n\t\t\t\t\t<h4><a class=\"qe_title\" href=\"" + url + "\" target=\"_blank\">" + StringTools.htmlEscape(item.title) + "</a></h4>\n\t\t\t\t</header>\n\t\t\t\t<span class=\"controls\">\n\t\t\t\t\t<button class=\"qbtn-play\" title=\"" + Lang.get("play") + "\"><ion-icon name=\"play\"></ion-icon></button>\n\t\t\t\t\t<button class=\"qbtn-next\" title=\"" + Lang.get("setNext") + "\"><ion-icon name=\"arrow-up\"></ion-icon></button>\n\t\t\t\t\t<button class=\"qbtn-tmp\"><ion-icon></ion-icon></button>\n\t\t\t\t\t<button class=\"qbtn-delete\" title=\"" + Lang.get("delete") + "\"><ion-icon name=\"close\"></ion-icon></button>\n\t\t\t\t</span>\n\t\t\t</li>");
+ var duration = item.isIframe ? "" : this.duration(item.duration);
+ var itemEl = client_Utils.nodeFromString("<li class=\"queue_entry info\" title=\"" + Lang.get("addedBy") + ": " + item.author + "\">\n\t\t\t\t<header>\n\t\t\t\t\t<span class=\"qe_time\">" + duration + "</span>\n\t\t\t\t\t<h4><a class=\"qe_title\" href=\"" + url + "\" target=\"_blank\">" + StringTools.htmlEscape(item.title) + "</a></h4>\n\t\t\t\t</header>\n\t\t\t\t<span class=\"controls\">\n\t\t\t\t\t<button class=\"qbtn-play\" title=\"" + Lang.get("play") + "\"><ion-icon name=\"play\"></ion-icon></button>\n\t\t\t\t\t<button class=\"qbtn-next\" title=\"" + Lang.get("setNext") + "\"><ion-icon name=\"arrow-up\"></ion-icon></button>\n\t\t\t\t\t<button class=\"qbtn-tmp\"><ion-icon></ion-icon></button>\n\t\t\t\t\t<button class=\"qbtn-delete\" title=\"" + Lang.get("delete") + "\"><ion-icon name=\"close\"></ion-icon></button>\n\t\t\t\t</span>\n\t\t\t</li>");
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() {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage