diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-20 18:31:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-24 14:04:05 +0200 |
commit | 0b18f4aa80df8868bf34605423c7a298dffbb2aa (patch) | |
tree | 25299da5d94fc73e88b21e87aeb2c156999c6fcd /server/models | |
parent | d525fc399a14a8b16eaad6d4c0bc0a9c4093c3c9 (diff) | |
download | PeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.tar.gz PeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.tar.zst PeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.zip |
Add advanced search in client
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video.ts | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 68116e309..b97dfd96f 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -851,7 +851,22 @@ export class VideoModel extends Model<VideoModel> { | |||
851 | }) | 851 | }) |
852 | } | 852 | } |
853 | 853 | ||
854 | static async searchAndPopulateAccountAndServer (options: VideosSearchQuery) { | 854 | static async searchAndPopulateAccountAndServer (options: { |
855 | search: string | ||
856 | start?: number | ||
857 | count?: number | ||
858 | sort?: string | ||
859 | startDate?: string // ISO 8601 | ||
860 | endDate?: string // ISO 8601 | ||
861 | nsfw?: boolean | ||
862 | categoryOneOf?: number[] | ||
863 | licenceOneOf?: number[] | ||
864 | languageOneOf?: string[] | ||
865 | tagsOneOf?: string[] | ||
866 | tagsAllOf?: string[] | ||
867 | durationMin?: number // seconds | ||
868 | durationMax?: number // seconds | ||
869 | }) { | ||
855 | const whereAnd = [ ] | 870 | const whereAnd = [ ] |
856 | 871 | ||
857 | if (options.startDate || options.endDate) { | 872 | if (options.startDate || options.endDate) { |