import { col, FindOptions, fn, literal, Op, Transaction, WhereOptions } from 'sequelize'
import { VideoStreamingPlaylistModel } from '../video/video-streaming-playlist'
import { CONFIG } from '../../initializers/config'
-import { MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/typings/models'
+import { MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/types/models'
import { VideoRedundanciesTarget } from '@shared/models/redundancy/video-redundancies-filters.model'
import {
FileRedundancyInformation,
limit: randomizedFactor,
order: getVideoSort('-views'),
where: {
- privacy: VideoPrivacy.PUBLIC
+ privacy: VideoPrivacy.PUBLIC,
+ isLive: false
},
include: [
await VideoRedundancyModel.buildVideoFileForDuplication(),
limit: randomizedFactor,
order: getVideoSort('-trending'),
where: {
- privacy: VideoPrivacy.PUBLIC
+ privacy: VideoPrivacy.PUBLIC,
+ isLive: false
},
include: [
await VideoRedundancyModel.buildVideoFileForDuplication(),
order: getVideoSort('-publishedAt'),
where: {
privacy: VideoPrivacy.PUBLIC,
+ isLive: false,
views: {
[Op.gte]: minViews
}