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;
|
var all = Server.channels;
|
||||||
for(var c in all) {
|
for(var c in all) {
|
||||||
var chan = all[c];
|
var chan = all[c];
|
||||||
if(!chan)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
chans.push({
|
chans.push({
|
||||||
name: chan.name,
|
name: chan.name,
|
||||||
|
|
2
api.js
2
api.js
|
@ -162,7 +162,7 @@ module.exports = function (Server) {
|
||||||
for(var key in Server.channels) {
|
for(var key in Server.channels) {
|
||||||
clist.push(Server.channels[key].name);
|
clist.push(Server.channels[key].name);
|
||||||
}
|
}
|
||||||
handleChannelData({channel: clist.join(",")}, req, res);
|
this.handleChannelData({channel: clist.join(",")}, req, res);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleLogin: function (params, req, res) {
|
handleLogin: function (params, req, res) {
|
||||||
|
|
|
@ -34,14 +34,14 @@ var Server = {
|
||||||
channels: [],
|
channels: [],
|
||||||
channelLoaded: function (name) {
|
channelLoaded: function (name) {
|
||||||
for(var i in this.channels) {
|
for(var i in this.channels) {
|
||||||
if(this.channels[i].name == name)
|
if(this.channels[i].name.toLowerCase() == name.toLowerCase())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
getChannel: function (name) {
|
getChannel: function (name) {
|
||||||
for(var i in this.channels) {
|
for(var i in this.channels) {
|
||||||
if(this.channels[i].name == name)
|
if(this.channels[i].name.toLowerCase() == name.toLowerCase())
|
||||||
return this.channels[i];
|
return this.channels[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ var Server = {
|
||||||
chan.saveDump();
|
chan.saveDump();
|
||||||
chan.playlist.die();
|
chan.playlist.die();
|
||||||
for(var i in this.channels) {
|
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);
|
this.channels.splice(i, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue