X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2F%2Bsearch%2Fsearch-filters.component.ts;h=aaa4ecc5a8534ece89e4381adf7f130acb86ad0d;hb=462a833e4c14b84224182adbe9e963535c165ad1;hp=f5f0c87ed36dbcb170486ea04c9c4b7e23f5a7b5;hpb=2989628b7913383b39ac34c7db8666a21f8e5037;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+search/search-filters.component.ts b/client/src/app/+search/search-filters.component.ts index f5f0c87ed..aaa4ecc5a 100644 --- a/client/src/app/+search/search-filters.component.ts +++ b/client/src/app/+search/search-filters.component.ts @@ -22,7 +22,6 @@ export class SearchFiltersComponent implements OnInit { publishedDateRanges: FormOption[] = [] sorts: FormOption[] = [] durationRanges: FormOption[] = [] - videoType: FormOption[] = [] publishedDateRange: string durationRange: string @@ -54,17 +53,6 @@ export class SearchFiltersComponent implements OnInit { } ] - this.videoType = [ - { - id: 'vod', - label: $localize`VOD videos` - }, - { - id: 'live', - label: $localize`Live videos` - } - ] - this.durationRanges = [ { id: 'short', @@ -99,7 +87,6 @@ export class SearchFiltersComponent implements OnInit { ngOnInit () { this.serverConfig = this.serverService.getHTMLConfig() - this.serverService.getVideoCategories().subscribe(categories => this.videoCategories = categories) this.serverService.getVideoLicences().subscribe(licences => this.videoLicences = licences) this.serverService.getVideoLanguages().subscribe(languages => this.videoLanguages = languages) @@ -109,14 +96,14 @@ export class SearchFiltersComponent implements OnInit { this.loadOriginallyPublishedAtYears() } - onInputUpdated () { + onDurationOrPublishedUpdated () { this.updateModelFromDurationRange() this.updateModelFromPublishedRange() this.updateModelFromOriginallyPublishedAtYears() } formUpdated () { - this.onInputUpdated() + this.onDurationOrPublishedUpdated() this.filtered.emit(this.advancedSearch) } @@ -128,7 +115,7 @@ export class SearchFiltersComponent implements OnInit { this.durationRange = undefined this.publishedDateRange = undefined - this.onInputUpdated() + this.onDurationOrPublishedUpdated() } resetField (fieldName: string, value?: any) { @@ -137,7 +124,7 @@ export class SearchFiltersComponent implements OnInit { resetLocalField (fieldName: string, value?: any) { this[fieldName] = value - this.onInputUpdated() + this.onDurationOrPublishedUpdated() } resetOriginalPublicationYears () {