mirror of https://github.com/calzoneman/sync.git
Fix unregistered channels and jwplayer custom timing
This commit is contained in:
parent
3cae0b0e57
commit
1917baa4c3
|
@ -434,9 +434,11 @@ PlaylistModule.prototype.queueStandard = function (user, data) {
|
|||
handleLookup();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
handleLookup();
|
||||
}
|
||||
|
||||
var handleLookup = function () {
|
||||
function handleLookup() {
|
||||
InfoGetter.getMedia(data.id, data.type, function (err, media) {
|
||||
if (err) {
|
||||
error(err+"");
|
||||
|
@ -449,10 +451,6 @@ PlaylistModule.prototype.queueStandard = function (user, data) {
|
|||
self.channel.activeLock.release();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
if (!lib || util.isLive(data.type)) {
|
||||
handleLookup();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -835,6 +833,11 @@ PlaylistModule.prototype._addItem = function (media, data, user, cb) {
|
|||
}
|
||||
};
|
||||
|
||||
if (data.duration) {
|
||||
media.seconds = data.duration;
|
||||
media.duration = util.formatTime(media.seconds);
|
||||
}
|
||||
|
||||
if (data.maxlength > 0 && media.seconds > data.maxlength) {
|
||||
return qfail("Video exceeds the maximum length set by the channel admin: " +
|
||||
data.maxlength + " seconds");
|
||||
|
|
Loading…
Reference in New Issue