diff options
Diffstat (limited to 'client/src/app/+video-channels')
2 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.html b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.html index befc7143c..1adc50180 100644 --- a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.html +++ b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.html | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | <div i18n class="no-results" *ngIf="pagination.totalItems === 0">This channel does not have playlists.</div> | 5 | <div i18n class="no-results" *ngIf="pagination.totalItems === 0">This channel does not have playlists.</div> |
6 | 6 | ||
7 | <div class="video-playlist" myInfiniteScroller (nearOfBottom)="onNearOfBottom()"> | 7 | <div class="video-playlist" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> |
8 | <div *ngFor="let playlist of videoPlaylists"> | 8 | <div *ngFor="let playlist of videoPlaylists"> |
9 | <my-video-playlist-miniature [playlist]="playlist" [toManage]="false"></my-video-playlist-miniature> | 9 | <my-video-playlist-miniature [playlist]="playlist" [toManage]="false"></my-video-playlist-miniature> |
10 | </div> | 10 | </div> |
diff --git a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts index 7990044a2..0b0033082 100644 --- a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts +++ b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
2 | import { ConfirmService } from '../../core/confirm' | 2 | import { ConfirmService } from '../../core/confirm' |
3 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 3 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
4 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 4 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
5 | import { Subscription } from 'rxjs' | 5 | import { Subject, Subscription } from 'rxjs' |
6 | import { Notifier } from '@app/core' | 6 | import { Notifier } from '@app/core' |
7 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' | 7 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' |
8 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' | 8 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' |
@@ -22,6 +22,8 @@ export class VideoChannelPlaylistsComponent implements OnInit, OnDestroy { | |||
22 | totalItems: null | 22 | totalItems: null |
23 | } | 23 | } |
24 | 24 | ||
25 | onDataSubject = new Subject<any[]>() | ||
26 | |||
25 | private videoChannelSub: Subscription | 27 | private videoChannelSub: Subscription |
26 | private videoChannel: VideoChannel | 28 | private videoChannel: VideoChannel |
27 | 29 | ||
@@ -53,10 +55,12 @@ export class VideoChannelPlaylistsComponent implements OnInit, OnDestroy { | |||
53 | } | 55 | } |
54 | 56 | ||
55 | private loadVideoPlaylists () { | 57 | private loadVideoPlaylists () { |
56 | this.videoPlaylistService.listChannelPlaylists(this.videoChannel) | 58 | this.videoPlaylistService.listChannelPlaylists(this.videoChannel, this.pagination) |
57 | .subscribe(res => { | 59 | .subscribe(res => { |
58 | this.videoPlaylists = this.videoPlaylists.concat(res.data) | 60 | this.videoPlaylists = this.videoPlaylists.concat(res.data) |
59 | this.pagination.totalItems = res.total | 61 | this.pagination.totalItems = res.total |
62 | |||
63 | this.onDataSubject.next(res.data) | ||
60 | }) | 64 | }) |
61 | } | 65 | } |
62 | } | 66 | } |