languageOneOf?: string[]
tagsOneOf?: string[]
tagsAllOf?: string[]
+ privacyOneOf?: VideoPrivacy[]
uuids?: string[]
this.whereStateAvailable()
}
- // Only list videos with the appropriate priavcy
- if (!(options.include & VideoInclude.HIDDEN_PRIVACY)) {
- this.wherePrivacyAvailable(options.user)
- }
-
if (options.videoPlaylistId) {
this.joinPlaylist(options.videoPlaylistId)
}
this.whereTagsAllOf(options.tagsAllOf)
}
+ if (options.privacyOneOf) {
+ this.wherePrivacyOneOf(options.privacyOneOf)
+ } else {
+ // Only list videos with the appropriate priavcy
+ this.wherePrivacyAvailable(options.user)
+ }
+
if (options.uuids) {
this.whereUUIDs(options.uuids)
}
)
}
+ private wherePrivacyOneOf (privacyOneOf: VideoPrivacy[]) {
+ this.and.push('"video"."privacy" IN (:privacyOneOf)')
+ this.replacements.privacyOneOf = privacyOneOf
+ }
+
private whereUUIDs (uuids: string[]) {
this.and.push('"video"."uuid" IN (' + createSafeIn(this.sequelize, uuids) + ')')
}