mirror of https://github.com/calzoneman/sync.git
More fixes
This commit is contained in:
parent
8b05e6ebcc
commit
9b7ebde551
2
acp.js
2
acp.js
|
@ -118,8 +118,6 @@ module.exports = function (Server) {
|
|||
var all = Server.channels;
|
||||
for(var c in all) {
|
||||
var chan = all[c];
|
||||
if(!chan)
|
||||
continue;
|
||||
|
||||
chans.push({
|
||||
name: chan.name,
|
||||
|
|
2
api.js
2
api.js
|
@ -162,7 +162,7 @@ module.exports = function (Server) {
|
|||
for(var key in Server.channels) {
|
||||
clist.push(Server.channels[key].name);
|
||||
}
|
||||
handleChannelData({channel: clist.join(",")}, req, res);
|
||||
this.handleChannelData({channel: clist.join(",")}, req, res);
|
||||
},
|
||||
|
||||
handleLogin: function (params, req, res) {
|
||||
|
|
|
@ -34,14 +34,14 @@ var Server = {
|
|||
channels: [],
|
||||
channelLoaded: function (name) {
|
||||
for(var i in this.channels) {
|
||||
if(this.channels[i].name == name)
|
||||
if(this.channels[i].name.toLowerCase() == name.toLowerCase())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getChannel: function (name) {
|
||||
for(var i in this.channels) {
|
||||
if(this.channels[i].name == name)
|
||||
if(this.channels[i].name.toLowerCase() == name.toLowerCase())
|
||||
return this.channels[i];
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ var Server = {
|
|||
chan.saveDump();
|
||||
chan.playlist.die();
|
||||
for(var i in this.channels) {
|
||||
if(this.channels[i].name == chan.name) {
|
||||
if(this.channels[i].name.toLowerCase() == chan.name.toLowerCase()) {
|
||||
this.channels.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue