Fix live media

This commit is contained in:
Calvin Montgomery 2013-07-06 01:45:15 -04:00
parent dce341e42b
commit 6e4f27d618
2 changed files with 3 additions and 2 deletions

View File

@ -372,7 +372,7 @@ exports.getMedia = function(id, type, callback) {
"us": "Ustream.tv - ",
"jw": "JWPlayer Stream - "
};
var media = new Media(data.id, prefix[data.type] + data.id, "--:--", data.type);
var media = new Media(id, prefix[type] + id, "--:--", type);
callback(false, media);
break;
case "rt":
@ -381,7 +381,7 @@ exports.getMedia = function(id, type, callback) {
"rt": "Livestream",
"im": "Imgur Album"
};
var media = new Media(data.id, names[data.type], "--:--", data.type);
var media = new Media(id, names[type], "--:--", type);
callback(false, media);
break;
default:

View File

@ -47,6 +47,7 @@ function Playlist(chan) {
chan.sendAll("changeMedia", m.fullupdate());
});
this.on("remove", function(item) {
chan.broadcastPlaylistMeta();
chan.sendAll("delete", {
uid: item.uid
});