diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts | 6 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch-playlist.component.ts | 4 |
2 files changed, 4 insertions, 6 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 f878a5a24..907aefae1 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 | |||
@@ -1,9 +1,7 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { AuthService } from '../../core/auth' | ||
3 | import { ConfirmService } from '../../core/confirm' | 2 | import { ConfirmService } from '../../core/confirm' |
4 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 3 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
5 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 4 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
6 | import { flatMap } from 'rxjs/operators' | ||
7 | import { Subscription } from 'rxjs' | 5 | import { Subscription } from 'rxjs' |
8 | import { Notifier } from '@app/core' | 6 | import { Notifier } from '@app/core' |
9 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' | 7 | import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' |
@@ -28,7 +26,6 @@ export class VideoChannelPlaylistsComponent implements OnInit, OnDestroy { | |||
28 | private videoChannel: VideoChannel | 26 | private videoChannel: VideoChannel |
29 | 27 | ||
30 | constructor ( | 28 | constructor ( |
31 | private authService: AuthService, | ||
32 | private notifier: Notifier, | 29 | private notifier: Notifier, |
33 | private confirmService: ConfirmService, | 30 | private confirmService: ConfirmService, |
34 | private videoPlaylistService: VideoPlaylistService, | 31 | private videoPlaylistService: VideoPlaylistService, |
@@ -57,8 +54,7 @@ export class VideoChannelPlaylistsComponent implements OnInit, OnDestroy { | |||
57 | } | 54 | } |
58 | 55 | ||
59 | private loadVideoPlaylists () { | 56 | private loadVideoPlaylists () { |
60 | this.authService.userInformationLoaded | 57 | this.videoPlaylistService.listChannelPlaylists(this.videoChannel) |
61 | .pipe(flatMap(() => this.videoPlaylistService.listChannelPlaylists(this.videoChannel))) | ||
62 | .subscribe(res => { | 58 | .subscribe(res => { |
63 | this.videoPlaylists = this.videoPlaylists.concat(res.data) | 59 | this.videoPlaylists = this.videoPlaylists.concat(res.data) |
64 | this.pagination.totalItems = res.total | 60 | this.pagination.totalItems = res.total |
diff --git a/client/src/app/videos/+video-watch/video-watch-playlist.component.ts b/client/src/app/videos/+video-watch/video-watch-playlist.component.ts index 3ac06c099..bccdaf7b2 100644 --- a/client/src/app/videos/+video-watch/video-watch-playlist.component.ts +++ b/client/src/app/videos/+video-watch/video-watch-playlist.component.ts | |||
@@ -47,7 +47,9 @@ export class VideoWatchPlaylistComponent { | |||
47 | } | 47 | } |
48 | 48 | ||
49 | isPlaylistOwned () { | 49 | isPlaylistOwned () { |
50 | return this.playlist.isLocal === true && this.playlist.ownerAccount.name === this.auth.getUser().username | 50 | return this.playlist.isLocal === true && |
51 | this.auth.isLoggedIn() && | ||
52 | this.playlist.ownerAccount.name === this.auth.getUser().username | ||
51 | } | 53 | } |
52 | 54 | ||
53 | isUnlistedPlaylist () { | 55 | isUnlistedPlaylist () { |