From 875f0610e42fad6046cc731fed1953cb0a451f38 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 Nov 2020 11:30:10 +0100 Subject: Don't take into account ended lives in concurrent lives check --- server/models/video/video.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index f3055a494..f1782f78d 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -129,6 +129,7 @@ import { VideoShareModel } from './video-share' import { VideoStreamingPlaylistModel } from './video-streaming-playlist' import { VideoTagModel } from './video-tag' import { VideoViewModel } from './video-view' +import { ne } from 'sequelize/types/lib/operators' export enum ScopeNames { AVAILABLE_FOR_LIST_IDS = 'AVAILABLE_FOR_LIST_IDS', @@ -1181,7 +1182,10 @@ export class VideoModel extends Model { const options = { where: { remote: false, - isLive: true + isLive: true, + state: { + [Op.ne]: VideoState.LIVE_ENDED + } } } -- cgit v1.2.3