merge upstream
This commit is contained in:
commit
e7adec32d7
12 changed files with 1457 additions and 7136 deletions
|
|
@ -16,7 +16,6 @@ AnonymousCheck.prototype.onUserPreJoin = function (user, data, cb) {
|
|||
}
|
||||
|
||||
if(anonymousBanned && user.isAnonymous()) {
|
||||
//if(anonymousBanned && user.account.globalRank <= 0) {
|
||||
user.socket.on("disconnect", function () {
|
||||
if (!user.is(Flags.U_IN_CHANNEL)) {
|
||||
cb("User disconnected", ChannelModule.DENY);
|
||||
|
|
|
|||
|
|
@ -710,7 +710,6 @@ PlaylistModule.prototype.handleMoveMedia = function (user, data) {
|
|||
return lock.release();
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!self.items.insertAfter(from, data.after)) {
|
||||
self.channel.refCounter.unref("PlaylistModule::handleMoveMedia");
|
||||
return lock.release();
|
||||
|
|
|
|||
|
|
@ -80,7 +80,10 @@ VoteskipModule.prototype.update = function () {
|
|||
|
||||
const { counts } = this.poll.toUpdateFrame(false);
|
||||
const { total, eligible, noPermission, afk } = this.calcUsercounts();
|
||||
const need = Math.ceil(eligible * this.channel.modules.options.get("voteskip_ratio"));
|
||||
const need = Math.max(
|
||||
1, // Require at least one vote, see #944
|
||||
Math.ceil(eligible * this.channel.modules.options.get("voteskip_ratio"))
|
||||
);
|
||||
if (counts[0] >= need) {
|
||||
const info = `${counts[0]}/${eligible} skipped; ` +
|
||||
`eligible voters: ${eligible} = total (${total}) - AFK (${afk}) ` +
|
||||
|
|
|
|||
|
|
@ -30,10 +30,6 @@ const SOURCE_CONTENT_TYPES = new Set([
|
|||
'video/webm'
|
||||
]);
|
||||
|
||||
const LIVE_ONLY_CONTENT_TYPES = new Set([
|
||||
'application/dash+xml'
|
||||
]);
|
||||
|
||||
export function lookup(url, opts) {
|
||||
if (!opts) opts = {};
|
||||
if (!opts.hasOwnProperty('timeout')) opts.timeout = 10000;
|
||||
|
|
@ -183,11 +179,6 @@ function validateSources(sources, data) {
|
|||
`unacceptable source contentType "${source.contentType}"`
|
||||
);
|
||||
|
||||
if (LIVE_ONLY_CONTENT_TYPES.has(source.contentType) && !data.live)
|
||||
throw new ValidationError(
|
||||
`contentType "${source.contentType}" requires live: true`
|
||||
);
|
||||
|
||||
if (!SOURCE_QUALITIES.has(source.quality))
|
||||
throw new ValidationError(`unacceptable source quality "${source.quality}"`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue