Fix random playlist death bug

This commit is contained in:
calzoneman 2014-02-16 13:12:49 -06:00
parent b37893176f
commit 54102863ac
2 changed files with 2 additions and 2 deletions

View file

@ -291,7 +291,7 @@ module.exports = {
// Note that before this line, chan.name might have a different capitalization // Note that before this line, chan.name might have a different capitalization
// than the database has stored. Update accordingly. // than the database has stored. Update accordingly.
chan.name = res[0].name; chan.name = res[0].name;
chan.canonical_name = chan.name.toLowerCase(); chan.uniqueName = chan.name.toLowerCase();
chan.registered = true; chan.registered = true;
chan.logger.log("[init] Loaded channel from database"); chan.logger.log("[init] Loaded channel from database");
callback(null, true); callback(null, true);

View file

@ -36,7 +36,7 @@ PlaylistItem.prototype.pack = function() {
} }
function Playlist(chan) { function Playlist(chan) {
var name = chan.canonical_name; var name = chan.uniqueName;
if(name in AllPlaylists && AllPlaylists[name]) { if(name in AllPlaylists && AllPlaylists[name]) {
var pl = AllPlaylists[name]; var pl = AllPlaylists[name];
if(!pl.dead) if(!pl.dead)