diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-06 13:06:13 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-06 13:34:08 +0100 |
commit | 51b34a11b298b466faef9c8d24beec4442d7add3 (patch) | |
tree | 57f9969eb5eb31f9b7cd8f1185927b105a3de809 /client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts | |
parent | 46db9430af70f45bc656cb0ac8e519f5d0be0149 (diff) | |
download | PeerTube-51b34a11b298b466faef9c8d24beec4442d7add3.tar.gz PeerTube-51b34a11b298b466faef9c8d24beec4442d7add3.tar.zst PeerTube-51b34a11b298b466faef9c8d24beec4442d7add3.zip |
Share playlists state
Diffstat (limited to 'client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts')
-rw-r--r-- | client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts index bb2fe7da3..4864581b5 100644 --- a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts +++ b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts | |||
@@ -96,7 +96,9 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { | |||
96 | } | 96 | } |
97 | 97 | ||
98 | removeFromPlaylist (playlistElement: VideoPlaylistElement) { | 98 | removeFromPlaylist (playlistElement: VideoPlaylistElement) { |
99 | this.videoPlaylistService.removeVideoFromPlaylist(this.playlist.id, playlistElement.id) | 99 | const videoId = this.playlistElement.video ? this.playlistElement.video.id : undefined |
100 | |||
101 | this.videoPlaylistService.removeVideoFromPlaylist(this.playlist.id, playlistElement.id, videoId) | ||
100 | .subscribe( | 102 | .subscribe( |
101 | () => { | 103 | () => { |
102 | this.notifier.success(this.i18n('Video removed from {{name}}', { name: this.playlist.displayName })) | 104 | this.notifier.success(this.i18n('Video removed from {{name}}', { name: this.playlist.displayName })) |
@@ -116,7 +118,7 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { | |||
116 | body.startTimestamp = this.timestampOptions.startTimestampEnabled ? this.timestampOptions.startTimestamp : null | 118 | body.startTimestamp = this.timestampOptions.startTimestampEnabled ? this.timestampOptions.startTimestamp : null |
117 | body.stopTimestamp = this.timestampOptions.stopTimestampEnabled ? this.timestampOptions.stopTimestamp : null | 119 | body.stopTimestamp = this.timestampOptions.stopTimestampEnabled ? this.timestampOptions.stopTimestamp : null |
118 | 120 | ||
119 | this.videoPlaylistService.updateVideoOfPlaylist(this.playlist.id, playlistElement.id, body) | 121 | this.videoPlaylistService.updateVideoOfPlaylist(this.playlist.id, playlistElement.id, body, this.playlistElement.video.id) |
120 | .subscribe( | 122 | .subscribe( |
121 | () => { | 123 | () => { |
122 | this.notifier.success(this.i18n('Timestamps updated')) | 124 | this.notifier.success(this.i18n('Timestamps updated')) |