Fix channeldata API for current media

This commit is contained in:
Calvin Montgomery 2013-07-05 23:40:31 -04:00
parent 6a9c9f9235
commit 53f6a39a7a
1 changed files with 1 additions and 1 deletions

2
api.js
View File

@ -136,7 +136,7 @@ function handleChannelData(params, req, res) {
if(d.loaded) {
var chan = Server.channels[cname];
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.users = [];
for(var i = 0; i < chan.users.length; i++) {