Add check for #766

This commit is contained in:
Calvin Montgomery 2018-08-29 20:40:24 -07:00
parent 7b0427afa2
commit d9e2a62f77
2 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"author": "Calvin Montgomery",
"name": "CyTube",
"description": "Online media synchronizer and chat",
"version": "3.58.0",
"version": "3.58.1",
"repository": {
"url": "http://github.com/calzoneman/sync"
},

View File

@ -957,6 +957,10 @@ PlaylistModule.prototype._addItem = function (media, data, user, cb) {
if (data.duration) {
media.seconds = data.duration;
media.duration = util.formatTime(media.seconds);
} else if (media.seconds === 0 && !this.channel.modules.permissions.canAddLive(user)) {
// Issue #766
qfail("You don't have permission to add livestreams");
return;
}
if (data.maxlength > 0 && media.seconds > data.maxlength) {