diff options
Diffstat (limited to 'client/src/app/shared/video-playlist/video-add-to-playlist.component.ts')
-rw-r--r-- | client/src/app/shared/video-playlist/video-add-to-playlist.component.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts index 705f62404..152f20c85 100644 --- a/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts +++ b/client/src/app/shared/video-playlist/video-add-to-playlist.component.ts | |||
@@ -24,6 +24,7 @@ type PlaylistSummary = { | |||
24 | export class VideoAddToPlaylistComponent extends FormReactive implements OnInit { | 24 | export class VideoAddToPlaylistComponent extends FormReactive implements OnInit { |
25 | @Input() video: Video | 25 | @Input() video: Video |
26 | @Input() currentVideoTimestamp: number | 26 | @Input() currentVideoTimestamp: number |
27 | @Input() lazyLoad = false | ||
27 | 28 | ||
28 | isNewPlaylistBlockOpened = false | 29 | isNewPlaylistBlockOpened = false |
29 | videoPlaylists: PlaylistSummary[] = [] | 30 | videoPlaylists: PlaylistSummary[] = [] |
@@ -57,6 +58,10 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit | |||
57 | displayName: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME | 58 | displayName: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME |
58 | }) | 59 | }) |
59 | 60 | ||
61 | if (this.lazyLoad !== true) this.load() | ||
62 | } | ||
63 | |||
64 | load () { | ||
60 | forkJoin([ | 65 | forkJoin([ |
61 | this.videoPlaylistService.listAccountPlaylists(this.user.account, '-updatedAt'), | 66 | this.videoPlaylistService.listAccountPlaylists(this.user.account, '-updatedAt'), |
62 | this.videoPlaylistService.doesVideoExistInPlaylist(this.video.id) | 67 | this.videoPlaylistService.doesVideoExistInPlaylist(this.video.id) |