mirror of https://github.com/calzoneman/sync.git
Fix #289
This commit is contained in:
parent
75ea06ed76
commit
89422c3c1d
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Oct 03 22:05 2013 CDT
|
||||||
|
* lib/channel.js, lib/playlist.js: Fix 'next' bumping not properly
|
||||||
|
telling clients that the old item was deleted
|
||||||
|
|
||||||
Wed Oct 02 22:25 2013 CDT
|
Wed Oct 02 22:25 2013 CDT
|
||||||
* www/channel.html, www/assets/js/ui.js, www/assets/js/callbacks.js:
|
* www/channel.html, www/assets/js/ui.js, www/assets/js/callbacks.js:
|
||||||
Add a small toggle for the MOTD
|
Add a small toggle for the MOTD
|
||||||
|
|
|
@ -1057,9 +1057,9 @@ Channel.prototype.broadcastNewUser = function(user) {
|
||||||
// If the channel is empty and isn't registered, the first person
|
// If the channel is empty and isn't registered, the first person
|
||||||
// gets ownership of the channel (temporarily)
|
// gets ownership of the channel (temporarily)
|
||||||
if(self.dbloaded && self.users.length == 1 && !self.registered) {
|
if(self.dbloaded && self.users.length == 1 && !self.registered) {
|
||||||
user.rank = (user.rank < Rank.Owner) ? 10 : user.rank;
|
user.rank = (user.rank < 10) ? 10 : user.rank;
|
||||||
user.socket.emit("channelNotRegistered");
|
user.socket.emit("channelNotRegistered");
|
||||||
user.socket.emit("rank", 10);
|
user.socket.emit("rank", user.rank);
|
||||||
}
|
}
|
||||||
self.server.db.listAliases(user.ip, function (err, aliases) {
|
self.server.db.listAliases(user.ip, function (err, aliases) {
|
||||||
if(err) {
|
if(err) {
|
||||||
|
@ -1432,6 +1432,15 @@ Channel.prototype.addMedia = function(data, user) {
|
||||||
q.release();
|
q.release();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Pre-cached data (e.g. from a playlist)
|
||||||
|
if (typeof data.title === "string" && data.type !== "cu") {
|
||||||
|
self.plqueue.queue(function (q) {
|
||||||
|
var m = new Media(data.id, data.title, data.seconds, data.type);
|
||||||
|
afterData.bind(self, q, false)(m);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// special case for youtube playlists
|
// special case for youtube playlists
|
||||||
if (data.type === "yp") {
|
if (data.type === "yp") {
|
||||||
self.plqueue.queue(function (q) {
|
self.plqueue.queue(function (q) {
|
||||||
|
|
|
@ -169,12 +169,11 @@ Playlist.prototype.add = function(item, pos) {
|
||||||
return "This item is already on the playlist";
|
return "This item is already on the playlist";
|
||||||
}
|
}
|
||||||
|
|
||||||
self.remove(it.uid, function () {
|
self.remove(it.uid);
|
||||||
self.channel.sendAll("delete", {
|
self.channel.sendAll("delete", {
|
||||||
uid: it.uid
|
uid: it.uid
|
||||||
});
|
});
|
||||||
self.channel.broadcastPlaylistMeta();
|
self.channel.broadcastPlaylistMeta();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pos == "append") {
|
if(pos == "append") {
|
||||||
|
|
Loading…
Reference in New Issue