aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts')
-rw-r--r--client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts8
1 files changed, 6 insertions, 2 deletions
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'
2import { ConfirmService } from '../../core/confirm' 2import { ConfirmService } from '../../core/confirm'
3import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 3import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
4import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 4import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
5import { Subscription } from 'rxjs' 5import { Subject, Subscription } from 'rxjs'
6import { Notifier } from '@app/core' 6import { Notifier } from '@app/core'
7import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' 7import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
8import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' 8import { 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}