diff options
Diffstat (limited to 'client/src/app/shared/video/video.service.ts')
-rw-r--r-- | client/src/app/shared/video/video.service.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index 2da36ff1b..4783adf42 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts | |||
@@ -158,7 +158,8 @@ export class VideoService { | |||
158 | getVideos ( | 158 | getVideos ( |
159 | videoPagination: ComponentPagination, | 159 | videoPagination: ComponentPagination, |
160 | sort: VideoSortField, | 160 | sort: VideoSortField, |
161 | filter?: VideoFilter | 161 | filter?: VideoFilter, |
162 | category?: number | ||
162 | ): Observable<{ videos: Video[], totalVideos: number }> { | 163 | ): Observable<{ videos: Video[], totalVideos: number }> { |
163 | const pagination = this.restService.componentPaginationToRestPagination(videoPagination) | 164 | const pagination = this.restService.componentPaginationToRestPagination(videoPagination) |
164 | 165 | ||
@@ -169,6 +170,10 @@ export class VideoService { | |||
169 | params = params.set('filter', filter) | 170 | params = params.set('filter', filter) |
170 | } | 171 | } |
171 | 172 | ||
173 | if (category) { | ||
174 | params = params.set('category', category + '') | ||
175 | } | ||
176 | |||
172 | return this.authHttp | 177 | return this.authHttp |
173 | .get<ResultList<Video>>(VideoService.BASE_VIDEO_URL, { params }) | 178 | .get<ResultList<Video>>(VideoService.BASE_VIDEO_URL, { params }) |
174 | .pipe( | 179 | .pipe( |
@@ -202,11 +207,13 @@ export class VideoService { | |||
202 | return feeds | 207 | return feeds |
203 | } | 208 | } |
204 | 209 | ||
205 | getVideoFeedUrls (sort: VideoSortField, filter?: VideoFilter) { | 210 | getVideoFeedUrls (sort: VideoSortField, filter?: VideoFilter, category?: number) { |
206 | let params = this.restService.addRestGetParams(new HttpParams(), undefined, sort) | 211 | let params = this.restService.addRestGetParams(new HttpParams(), undefined, sort) |
207 | 212 | ||
208 | if (filter) params = params.set('filter', filter) | 213 | if (filter) params = params.set('filter', filter) |
209 | 214 | ||
215 | if (category) params = params.set('category', category + '') | ||
216 | |||
210 | return this.buildBaseFeedUrls(params) | 217 | return this.buildBaseFeedUrls(params) |
211 | } | 218 | } |
212 | 219 | ||