Minor fixes for queueWarn

This commit is contained in:
calzoneman 2015-12-20 22:35:24 -08:00
parent e9e3cbb575
commit 5a2ef2d24d
2 changed files with 7 additions and 6 deletions

View File

@ -921,7 +921,8 @@ PlaylistModule.prototype._addItem = function (media, data, user, cb) {
if (media.type === "fi" && media.meta.bitrate > 1000) {
user.socket.emit("queueWarn", {
msg: "This video has a bitrate over 1000kbps. Clients with slow " +
"connections may experience lots of buffering."
"connections may experience lots of buffering.",
link: data.link
});
}
@ -933,7 +934,8 @@ PlaylistModule.prototype._addItem = function (media, data, user, cb) {
user.socket.emit("queueWarn", {
msg: "The codec <code>" + media.meta.codec + "</code> is not supported " +
"by all browsers, and is not supported by the flash fallback layer. " +
"This video may not play for some users."
"This video may not play for some users.",
link: data.link
});
}

View File

@ -2018,9 +2018,7 @@ function queueMessage(data, type) {
var alerts = $(".qfalert.qf-" + type + " .alert");
for (var i = 0; i < alerts.length; i++) {
var al = $(alerts[i]);
var cl = al.clone();
cl.children().remove();
if (cl.text() === data.msg) {
if (al.data("reason") === data.msg) {
var tag = al.find("." + ltype);
if (tag.length > 0) {
var morelinks = al.find(".qflinks");
@ -2057,9 +2055,10 @@ function queueMessage(data, type) {
text += "<br><a href='" + data.link + "' target='_blank'>" +
data.link + "</a>";
}
makeAlert(title, text, type)
var newAlert = makeAlert(title, text, type)
.addClass("linewrap qfalert qf-" + type)
.appendTo($("#queuefail"));
newAlert.find(".alert").data("reason", data.msg);
}
function setupChanlogFilter(data) {