diff --git a/channel.js b/channel.js index 688358ea..7f28b90b 100644 --- a/channel.js +++ b/channel.js @@ -1229,6 +1229,9 @@ Channel.prototype.tryQueue = function(user, data) { return; } + if(typeof data.title !== "string") + data.title = false; + var count = this.playlist.count(data.id); if(user.rank < Rank.Moderator && count >= 5) { @@ -1277,6 +1280,8 @@ Channel.prototype.addMedia = function(data, user) { : this.opts.maxlength; var postAdd = function (item, cached) { + if(item.media.type === "cu" && data.title) + item.media.title = data.title; self.logger.log("### " + user.name + " queued " + item.media.title); self.sendAll("queue", { item: item.pack(), diff --git a/www/assets/js/ui.js b/www/assets/js/ui.js index eaaa6e6a..ee660870 100644 --- a/www/assets/js/ui.js +++ b/www/assets/js/ui.js @@ -279,12 +279,18 @@ $("#queue").disableSelection(); function queue(pos) { if($("#customembed_code").val()) { + var title = false; + if($("#customembed_title").val()) { + title = $("#customembed_title").val(); + } socket.emit("queue", { id: $("#customembed_code").val(), + title: title, type: "cu", pos: pos }); $("#customembed_code").val(""); + $("#customembed_title").val(""); return; } var links = $("#mediaurl").val().split(","); diff --git a/www/channel.html b/www/channel.html index cdca4f8a..5b5b14b9 100644 --- a/www/channel.html +++ b/www/channel.html @@ -180,6 +180,7 @@