X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideo-list%2Fvideo-trending.component.ts;h=8f3d3842b494a31c74e6de679ee8c3159b5fb918;hb=9a629c6efbe39dfac290347670ca41b0d7100f41;hp=760470e8c24721787eefd5993c5938b53cc30856;hpb=989e526abf0c0dd7958deb630df009608561bb67;p=github%2FChocobozzz%2FPeerTube.git 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 760470e8c..8f3d3842b 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts @@ -8,6 +8,7 @@ import { AbstractVideoList } from '../../shared/video/abstract-video-list' import { VideoSortField } from '../../shared/video/sort-field.type' import { VideoService } from '../../shared/video/video.service' import { I18n } from '@ngx-translate/i18n-polyfill' +import { ScreenService } from '@app/shared/misc/screen.service' @Component({ selector: 'my-videos-trending', @@ -17,7 +18,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy { titlePage: string currentRoute = '/videos/trending' - defaultSort: VideoSortField = '-views' + defaultSort: VideoSortField = '-trending' constructor ( protected router: Router, @@ -25,8 +26,9 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, protected notificationsService: NotificationsService, protected authService: AuthService, protected location: Location, - private videoService: VideoService, - private i18n: I18n + protected screenService: ScreenService, + protected i18n: I18n, + private videoService: VideoService ) { super() @@ -45,10 +47,10 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, getVideosObservable (page: number) { const newPagination = immutableAssign(this.pagination, { currentPage: page }) - return this.videoService.getVideos(newPagination, this.sort) + return this.videoService.getVideos(newPagination, this.sort, undefined, this.categoryOneOf) } generateSyndicationList () { - this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort) + this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.categoryOneOf) } }