aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/video-channel/video-channel.service.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
index 5e3985526..08811afec 100644
--- a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
+++ b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
@@ -2,7 +2,7 @@ import { Observable, ReplaySubject } from 'rxjs'
2import { catchError, map, tap } from 'rxjs/operators' 2import { catchError, map, tap } from 'rxjs/operators'
3import { HttpClient, HttpParams } from '@angular/common/http' 3import { HttpClient, HttpParams } from '@angular/common/http'
4import { Injectable } from '@angular/core' 4import { Injectable } from '@angular/core'
5import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' 5import { ComponentPaginationLight, RestExtractor, RestService, ServerService } from '@app/core'
6import { 6import {
7 ActorImage, 7 ActorImage,
8 ResultList, 8 ResultList,
@@ -25,7 +25,8 @@ export class VideoChannelService {
25 constructor ( 25 constructor (
26 private authHttp: HttpClient, 26 private authHttp: HttpClient,
27 private restService: RestService, 27 private restService: RestService,
28 private restExtractor: RestExtractor 28 private restExtractor: RestExtractor,
29 private serverService: ServerService
29 ) { } 30 ) { }
30 31
31 static extractVideoChannels (result: ResultList<VideoChannelServer>) { 32 static extractVideoChannels (result: ResultList<VideoChannelServer>) {
@@ -56,9 +57,11 @@ export class VideoChannelService {
56 }): Observable<ResultList<VideoChannel>> { 57 }): Observable<ResultList<VideoChannel>> {
57 const { account, componentPagination, withStats = false, sort, search } = options 58 const { account, componentPagination, withStats = false, sort, search } = options
58 59
60 const defaultCount = this.serverService.getHTMLConfig().videoChannels.maxPerUser
61
59 const pagination = componentPagination 62 const pagination = componentPagination
60 ? this.restService.componentToRestPagination(componentPagination) 63 ? this.restService.componentToRestPagination(componentPagination)
61 : { start: 0, count: 20 } 64 : { start: 0, count: defaultCount }
62 65
63 let params = new HttpParams() 66 let params = new HttpParams()
64 params = this.restService.addRestGetParams(params, pagination, sort) 67 params = this.restService.addRestGetParams(params, pagination, sort)