aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 215e26d7d..fe81fab1a 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1174,6 +1174,8 @@ export class VideoModel extends Model<VideoModel> {
1174 sort?: string 1174 sort?: string
1175 startDate?: string // ISO 8601 1175 startDate?: string // ISO 8601
1176 endDate?: string // ISO 8601 1176 endDate?: string // ISO 8601
1177 originallyPublishedStartDate?: string
1178 originallyPublishedEndDate?: string
1177 nsfw?: boolean 1179 nsfw?: boolean
1178 categoryOneOf?: number[] 1180 categoryOneOf?: number[]
1179 licenceOneOf?: number[] 1181 licenceOneOf?: number[]
@@ -1196,6 +1198,15 @@ export class VideoModel extends Model<VideoModel> {
1196 whereAnd.push({ publishedAt: publishedAtRange }) 1198 whereAnd.push({ publishedAt: publishedAtRange })
1197 } 1199 }
1198 1200
1201 if (options.originallyPublishedStartDate || options.originallyPublishedEndDate) {
1202 const originallyPublishedAtRange = {}
1203
1204 if (options.originallyPublishedStartDate) originallyPublishedAtRange[ Sequelize.Op.gte ] = options.originallyPublishedStartDate
1205 if (options.originallyPublishedEndDate) originallyPublishedAtRange[ Sequelize.Op.lte ] = options.originallyPublishedEndDate
1206
1207 whereAnd.push({ originallyPublishedAt: originallyPublishedAtRange })
1208 }
1209
1199 if (options.durationMin || options.durationMax) { 1210 if (options.durationMin || options.durationMax) {
1200 const durationRange = {} 1211 const durationRange = {}
1201 1212