]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-miniature/video-filters.model.ts
Fix notification on create transcoding job
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-miniature / video-filters.model.ts
index a3b8129f0a375c1ccb752c357d82073da62f1087..920dc826c7018fd20555006b6e4f96b4f9607d0c 100644 (file)
@@ -38,10 +38,14 @@ export class VideoFilters {
   private onChangeCallbacks: Array<() => void> = []
   private oldFormObjectString: string
 
-  constructor (defaultSort: string, defaultScope: VideoFilterScope) {
+  private readonly hiddenFields: string[] = []
+
+  constructor (defaultSort: string, defaultScope: VideoFilterScope, hiddenFields: string[] = []) {
     this.setDefaultSort(defaultSort)
     this.setDefaultScope(defaultScope)
 
+    this.hiddenFields = hiddenFields
+
     this.reset()
   }
 
@@ -160,6 +164,9 @@ export class VideoFilters {
         label: $localize`VOD videos`
       })
     }
+
+    this.activeFilters = this.activeFilters
+                             .filter(a => this.hiddenFields.includes(a.key) === false)
   }
 
   getActiveFilters () {