- this.videosSearchChanged
- .pipe(debounceTime(500))
- .subscribe(() => {
- this.videosSelection.reloadVideos()
- })
+ if (this.route.snapshot.queryParams['search']) {
+ this.search = this.route.snapshot.queryParams['search']
+ }
+
+ this.authService.userInformationLoaded.subscribe(() => {
+ this.user = this.authService.getUser()
+ this.userChannels = this.user.videoChannels
+
+ const channelFilters = [ ...this.userChannels ]
+ .sort((a, b) => a.displayName.localeCompare(b.displayName))
+ .map(c => {
+ return {
+ value: 'channel:' + c.name,
+ label: c.displayName
+ }
+ })
+
+ this.inputFilters = [
+ {
+ title: $localize`Advanced filters`,
+ children: [
+ {
+ value: 'isLive:true',
+ label: $localize`Only live videos`
+ }
+ ]
+ },
+
+ {
+ title: $localize`Channel filters`,
+ children: channelFilters
+ }
+ ]
+ })