X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bvideos%2F%2Bvideo-watch%2Frecommendations%2Frecent-videos-recommendation.service.ts;h=4654da8472e4276f7b394a328e152b9697082410;hb=fa12eacc014aae8094d108634371640f2695bf9f;hp=2a851f13a1dd5f65a95d0eaeef85bb0056184f35;hpb=4024c44f9027a32809931de0692d40d001df721c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+videos/+video-watch/recommendations/recent-videos-recommendation.service.ts b/client/src/app/+videos/+video-watch/recommendations/recent-videos-recommendation.service.ts index 2a851f13a..4654da847 100644 --- a/client/src/app/+videos/+video-watch/recommendations/recent-videos-recommendation.service.ts +++ b/client/src/app/+videos/+video-watch/recommendations/recent-videos-recommendation.service.ts @@ -4,7 +4,7 @@ import { Injectable } from '@angular/core' import { ServerService, UserService } from '@app/core' import { Video, VideoService } from '@app/shared/shared-main' import { AdvancedSearch, SearchService } from '@app/shared/shared-search' -import { ServerConfig } from '@shared/models' +import { HTMLServerConfig } from '@shared/models' import { RecommendationInfo } from './recommendation-info.model' import { RecommendationService } from './recommendations.service' @@ -15,7 +15,7 @@ import { RecommendationService } from './recommendations.service' export class RecentVideosRecommendationService implements RecommendationService { readonly pageSize = 5 - private config: ServerConfig + private config: HTMLServerConfig constructor ( private videos: VideoService, @@ -23,13 +23,11 @@ export class RecentVideosRecommendationService implements RecommendationService private userService: UserService, private serverService: ServerService ) { - this.config = this.serverService.getTmpConfig() - - this.serverService.getConfig() - .subscribe(config => this.config = config) + this.config = this.serverService.getHTMLConfig() } getRecommendations (recommendation: RecommendationInfo): Observable { + return this.fetchPage(1, recommendation) .pipe( map(videos => {