'activitypub-follow': 60000 * 10, // 10 minutes
'video-file-import': 1000 * 3600, // 1 hour
'video-file': 1000 * 3600 * 48, // 2 days, transcoding could be long
- 'video-import': 1000 * 3600 * 5, // 1 hour
+ 'video-import': 1000 * 3600, // 1 hour
'email': 60000 * 10, // 10 minutes
'videos-views': undefined // Unlimited
}
import { VideoModel } from '../video/video'
import { VideoRedundancyStrategy } from '../../../shared/models/redundancy'
import { logger } from '../../helpers/logger'
-import { CacheFileObject } from '../../../shared'
+import { CacheFileObject, VideoPrivacy } from '../../../shared'
import { VideoChannelModel } from '../video/video-channel'
import { ServerModel } from '../server/server'
import { sample } from 'lodash'
attributes: [ 'id', 'views' ],
limit: randomizedFactor,
order: getVideoSort('-views'),
+ where: {
+ privacy: VideoPrivacy.PUBLIC
+ },
include: [
await VideoRedundancyModel.buildVideoFileForDuplication(),
VideoRedundancyModel.buildServerRedundancyInclude()
group: 'VideoModel.id',
limit: randomizedFactor,
order: getVideoSort('-trending'),
+ where: {
+ privacy: VideoPrivacy.PUBLIC
+ },
include: [
await VideoRedundancyModel.buildVideoFileForDuplication(),
VideoRedundancyModel.buildServerRedundancyInclude(),
limit: randomizedFactor,
order: getVideoSort('-publishedAt'),
where: {
+ privacy: VideoPrivacy.PUBLIC,
views: {
[ Sequelize.Op.gte ]: minViews
}