mirror of https://github.com/calzoneman/sync.git
Fix channeldata API for current media
This commit is contained in:
parent
6a9c9f9235
commit
53f6a39a7a
2
api.js
2
api.js
|
@ -136,7 +136,7 @@ function handleChannelData(params, req, res) {
|
||||||
if(d.loaded) {
|
if(d.loaded) {
|
||||||
var chan = Server.channels[cname];
|
var chan = Server.channels[cname];
|
||||||
d.pagetitle = chan.opts.pagetitle;
|
d.pagetitle = chan.opts.pagetitle;
|
||||||
d.media = chan.media ? chan.media.pack() : {};
|
d.media = chan.playlist.current ? chan.playlist.current.media.pack() : {};
|
||||||
d.usercount = chan.users.length;
|
d.usercount = chan.users.length;
|
||||||
d.users = [];
|
d.users = [];
|
||||||
for(var i = 0; i < chan.users.length; i++) {
|
for(var i = 0; i < chan.users.length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue