Gracefully handle elements with null duration during user playlist save
This commit is contained in:
parent
b09346392e
commit
33294278ad
|
@ -404,14 +404,14 @@ module.exports.saveUserPlaylist = function (pl, username, plname, callback) {
|
|||
var e = {
|
||||
id: pl[i].media.id,
|
||||
title: pl[i].media.title,
|
||||
seconds: pl[i].media.seconds,
|
||||
seconds: pl[i].media.seconds || 0,
|
||||
type: pl[i].media.type,
|
||||
meta: {
|
||||
codec: pl[i].media.meta.codec,
|
||||
bitrate: pl[i].media.meta.bitrate
|
||||
}
|
||||
};
|
||||
time += pl[i].media.seconds;
|
||||
time += pl[i].media.seconds || 0;
|
||||
tmp.push(e);
|
||||
}
|
||||
var count = tmp.length;
|
||||
|
|
Loading…
Reference in a new issue