]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-search/advanced-search.model.ts
Prevent edition with 0 task
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-search / advanced-search.model.ts
index 1375820da12d0826947be111422c68f0e292475f..e8bb00fd326618b745948af417b07f5f3d1bd3ce 100644 (file)
@@ -1,4 +1,4 @@
-import { intoArray } from '@app/helpers'
+import { splitIntoArray } from '@app/helpers'
 import {
   BooleanBothQuery,
   BooleanQuery,
@@ -76,8 +76,8 @@ export class AdvancedSearch {
     this.categoryOneOf = options.categoryOneOf || undefined
     this.licenceOneOf = options.licenceOneOf || undefined
     this.languageOneOf = options.languageOneOf || undefined
-    this.tagsOneOf = intoArray(options.tagsOneOf)
-    this.tagsAllOf = intoArray(options.tagsAllOf)
+    this.tagsOneOf = splitIntoArray(options.tagsOneOf)
+    this.tagsAllOf = splitIntoArray(options.tagsAllOf)
     this.durationMin = options.durationMin ? parseInt(options.durationMin, 10) : undefined
     this.durationMax = options.durationMax ? parseInt(options.durationMax, 10) : undefined
 
@@ -152,9 +152,9 @@ export class AdvancedSearch {
       originallyPublishedStartDate: this.originallyPublishedStartDate,
       originallyPublishedEndDate: this.originallyPublishedEndDate,
       nsfw: this.nsfw,
-      categoryOneOf: intoArray(this.categoryOneOf),
-      licenceOneOf: intoArray(this.licenceOneOf),
-      languageOneOf: intoArray(this.languageOneOf),
+      categoryOneOf: splitIntoArray(this.categoryOneOf),
+      licenceOneOf: splitIntoArray(this.licenceOneOf),
+      languageOneOf: splitIntoArray(this.languageOneOf),
       tagsOneOf: this.tagsOneOf,
       tagsAllOf: this.tagsAllOf,
       durationMin: this.durationMin,
@@ -221,7 +221,6 @@ export class AdvancedSearch {
       this.tagsAllOf !== undefined ||
       this.durationMin !== undefined ||
       this.durationMax !== undefined ||
-      this.host !== undefined ||
       this.isLive !== undefined
   }
 }