aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/abstract-video-list.ts
diff options
context:
space:
mode:
authorPhieF <phoenamandre@gmail.com>2018-06-27 14:24:49 +0200
committerChocobozzz <me@florianbigard.com>2018-06-27 14:24:49 +0200
commit61b909b9bf849516f30dab2bf5977acfbbddc5c6 (patch)
tree8724ecfe2d8f054dde21f9e2acb32902321dfcf5 /client/src/app/shared/video/abstract-video-list.ts
parentadc236fee3c40bf1fbaa4ad4fc22a7ecb65fb09f (diff)
downloadPeerTube-61b909b9bf849516f30dab2bf5977acfbbddc5c6.tar.gz
PeerTube-61b909b9bf849516f30dab2bf5977acfbbddc5c6.tar.zst
PeerTube-61b909b9bf849516f30dab2bf5977acfbbddc5c6.zip
Filter by category (#720)
* get videos with specific category (api) * update api doc with category * add url parameter to filter by category * fix lint issues
Diffstat (limited to 'client/src/app/shared/video/abstract-video-list.ts')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index a468d3231..d60536e20 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -24,6 +24,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
24 totalItems: null 24 totalItems: null
25 } 25 }
26 sort: VideoSortField = '-publishedAt' 26 sort: VideoSortField = '-publishedAt'
27 category?: number
27 defaultSort: VideoSortField = '-publishedAt' 28 defaultSort: VideoSortField = '-publishedAt'
28 syndicationItems = [] 29 syndicationItems = []
29 30
@@ -167,7 +168,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
167 168
168 protected loadRouteParams (routeParams: { [ key: string ]: any }) { 169 protected loadRouteParams (routeParams: { [ key: string ]: any }) {
169 this.sort = routeParams['sort'] as VideoSortField || this.defaultSort 170 this.sort = routeParams['sort'] as VideoSortField || this.defaultSort
170 171 this.category = routeParams['category']
171 if (routeParams['page'] !== undefined) { 172 if (routeParams['page'] !== undefined) {
172 this.pagination.currentPage = parseInt(routeParams['page'], 10) 173 this.pagination.currentPage = parseInt(routeParams['page'], 10)
173 } else { 174 } else {