Update ffmpeg loader to work with newer fluent-ffmpeg; fix playlists

This commit is contained in:
Calvin Montgomery 2014-06-07 21:25:48 -07:00
parent 02771e6623
commit ac10f05f21
8 changed files with 72 additions and 28 deletions

View file

@ -885,7 +885,8 @@ PlaylistModule.prototype._addItem = function (media, data, user, cb) {
}
/* Warn about possibly unsupported formats */
if (media.type === "fi" && media.meta.codec.indexOf("/") !== -1 &&
if (media.type === "fi" && media.meta.codec &&
media.meta.codec.indexOf("/") !== -1 &&
media.meta.codec !== "mov/h264" &&
media.meta.codec !== "flv/h264") {
user.socket.emit("queueWarn", {
@ -1280,8 +1281,21 @@ PlaylistModule.prototype.handleQueuePlaylist = function (user, data) {
}
}
/* Ancient playlists don't have full data */
if (pl.length > 0 && !pl[0].hasOwnProperty("title")) {
pl.forEach(function (item) {
self.handleQueue(user, {
id: item.id,
type: item.type,
pos: data.pos,
temp: temp
});
});
return;
}
pl.forEach(function (item) {
var m = new Media(item.id, item.title, item.seconds, item.type);
var m = new Media(item.id, item.title, item.seconds, item.type, item.meta);
self._addItem(m, qdata, user);
});
self.channel.activeLock.release();