]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
Add advanced search in client
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index 68116e3096ebe556197a8469f3592697a3d8da57..b97dfd96f259f96feeefe2c820b42a2c0ec94a60 100644 (file)
@@ -851,7 +851,22 @@ export class VideoModel extends Model<VideoModel> {
       })
   }
 
-  static async searchAndPopulateAccountAndServer (options: VideosSearchQuery) {
+  static async searchAndPopulateAccountAndServer (options: {
+    search: string
+    start?: number
+    count?: number
+    sort?: string
+    startDate?: string // ISO 8601
+    endDate?: string // ISO 8601
+    nsfw?: boolean
+    categoryOneOf?: number[]
+    licenceOneOf?: number[]
+    languageOneOf?: string[]
+    tagsOneOf?: string[]
+    tagsAllOf?: string[]
+    durationMin?: number // seconds
+    durationMax?: number // seconds
+  }) {
     const whereAnd = [ ]
 
     if (options.startDate || options.endDate) {