aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-25 17:18:46 +0200
committerChocobozzz <me@florianbigard.com>2018-07-25 17:18:46 +0200
commitd59cba295b7f2ead41e1828c1567e60942476367 (patch)
tree2df3f92a07d7672268362bf9d51f2d685a91f0d2 /client
parent87bec1051b9706b4ae1efbd92e4d974c01d98c51 (diff)
downloadPeerTube-d59cba295b7f2ead41e1828c1567e60942476367.tar.gz
PeerTube-d59cba295b7f2ead41e1828c1567e60942476367.tar.zst
PeerTube-d59cba295b7f2ead41e1828c1567e60942476367.zip
category parma -> categoryOneOf (videos list)
Diffstat (limited to 'client')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts4
-rw-r--r--client/src/app/shared/video/video.service.ts10
-rw-r--r--client/src/app/videos/video-list/video-local.component.ts4
-rw-r--r--client/src/app/videos/video-list/video-recently-added.component.ts4
-rw-r--r--client/src/app/videos/video-list/video-trending.component.ts4
5 files changed, 13 insertions, 13 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index d60536e20..59d3c1ebe 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -24,7 +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 categoryOneOf?: number
28 defaultSort: VideoSortField = '-publishedAt' 28 defaultSort: VideoSortField = '-publishedAt'
29 syndicationItems = [] 29 syndicationItems = []
30 30
@@ -168,7 +168,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
168 168
169 protected loadRouteParams (routeParams: { [ key: string ]: any }) { 169 protected loadRouteParams (routeParams: { [ key: string ]: any }) {
170 this.sort = routeParams['sort'] as VideoSortField || this.defaultSort 170 this.sort = routeParams['sort'] as VideoSortField || this.defaultSort
171 this.category = routeParams['category'] 171 this.categoryOneOf = routeParams['categoryOneOf']
172 if (routeParams['page'] !== undefined) { 172 if (routeParams['page'] !== undefined) {
173 this.pagination.currentPage = parseInt(routeParams['page'], 10) 173 this.pagination.currentPage = parseInt(routeParams['page'], 10)
174 } else { 174 } else {
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index f316d31ea..ddf365959 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -159,7 +159,7 @@ export class VideoService {
159 videoPagination: ComponentPagination, 159 videoPagination: ComponentPagination,
160 sort: VideoSortField, 160 sort: VideoSortField,
161 filter?: VideoFilter, 161 filter?: VideoFilter,
162 category?: number 162 categoryOneOf?: number
163 ): Observable<{ videos: Video[], totalVideos: number }> { 163 ): Observable<{ videos: Video[], totalVideos: number }> {
164 const pagination = this.restService.componentPaginationToRestPagination(videoPagination) 164 const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
165 165
@@ -170,8 +170,8 @@ export class VideoService {
170 params = params.set('filter', filter) 170 params = params.set('filter', filter)
171 } 171 }
172 172
173 if (category) { 173 if (categoryOneOf) {
174 params = params.set('category', category + '') 174 params = params.set('categoryOneOf', categoryOneOf + '')
175 } 175 }
176 176
177 return this.authHttp 177 return this.authHttp
@@ -207,12 +207,12 @@ export class VideoService {
207 return feeds 207 return feeds
208 } 208 }
209 209
210 getVideoFeedUrls (sort: VideoSortField, filter?: VideoFilter, category?: number) { 210 getVideoFeedUrls (sort: VideoSortField, filter?: VideoFilter, categoryOneOf?: number) {
211 let params = this.restService.addRestGetParams(new HttpParams(), undefined, sort) 211 let params = this.restService.addRestGetParams(new HttpParams(), undefined, sort)
212 212
213 if (filter) params = params.set('filter', filter) 213 if (filter) params = params.set('filter', filter)
214 214
215 if (category) params = params.set('category', category + '') 215 if (categoryOneOf) params = params.set('categoryOneOf', categoryOneOf + '')
216 216
217 return this.buildBaseFeedUrls(params) 217 return this.buildBaseFeedUrls(params)
218 } 218 }
diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts
index de460ea60..c91c639ca 100644
--- a/client/src/app/videos/video-list/video-local.component.ts
+++ b/client/src/app/videos/video-list/video-local.component.ts
@@ -50,10 +50,10 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On
50 getVideosObservable (page: number) { 50 getVideosObservable (page: number) {
51 const newPagination = immutableAssign(this.pagination, { currentPage: page }) 51 const newPagination = immutableAssign(this.pagination, { currentPage: page })
52 52
53 return this.videoService.getVideos(newPagination, this.sort, this.filter, this.category) 53 return this.videoService.getVideos(newPagination, this.sort, this.filter, this.categoryOneOf)
54 } 54 }
55 55
56 generateSyndicationList () { 56 generateSyndicationList () {
57 this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, this.filter, this.category) 57 this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, this.filter, this.categoryOneOf)
58 } 58 }
59} 59}
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts
index 75688731d..ac1fcfff3 100644
--- a/client/src/app/videos/video-list/video-recently-added.component.ts
+++ b/client/src/app/videos/video-list/video-recently-added.component.ts
@@ -48,10 +48,10 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On
48 getVideosObservable (page: number) { 48 getVideosObservable (page: number) {
49 const newPagination = immutableAssign(this.pagination, { currentPage: page }) 49 const newPagination = immutableAssign(this.pagination, { currentPage: page })
50 50
51 return this.videoService.getVideos(newPagination, this.sort, undefined, this.category) 51 return this.videoService.getVideos(newPagination, this.sort, undefined, this.categoryOneOf)
52 } 52 }
53 53
54 generateSyndicationList () { 54 generateSyndicationList () {
55 this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.category) 55 this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.categoryOneOf)
56 } 56 }
57} 57}
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts
index 3738b95b1..68bb70265 100644
--- a/client/src/app/videos/video-list/video-trending.component.ts
+++ b/client/src/app/videos/video-list/video-trending.component.ts
@@ -47,10 +47,10 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
47 47
48 getVideosObservable (page: number) { 48 getVideosObservable (page: number) {
49 const newPagination = immutableAssign(this.pagination, { currentPage: page }) 49 const newPagination = immutableAssign(this.pagination, { currentPage: page })
50 return this.videoService.getVideos(newPagination, this.sort, undefined, this.category) 50 return this.videoService.getVideos(newPagination, this.sort, undefined, this.categoryOneOf)
51 } 51 }
52 52
53 generateSyndicationList () { 53 generateSyndicationList () {
54 this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.category) 54 this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.categoryOneOf)
55 } 55 }
56} 56}