- // Only list public/published videos
- if (!options.filter || (options.filter !== 'all-local' && options.filter !== 'all')) {
- this.whereStateAndPrivacyAvailable(options.user)
+ // Only list published videos
+ if (!(options.include & VideoInclude.NOT_PUBLISHED_STATE)) {
+ this.whereStateAvailable()
+ }
+
+ // Only list videos with the appropriate priavcy
+ if (!(options.include & VideoInclude.HIDDEN_PRIVACY)) {
+ this.wherePrivacyAvailable(options.user)