diff options
Diffstat (limited to 'client/src/app/videos/+video-edit/video-update.component.ts')
-rw-r--r-- | client/src/app/videos/+video-edit/video-update.component.ts | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts index 10f797d02..e990ceb13 100644 --- a/client/src/app/videos/+video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts | |||
@@ -3,7 +3,6 @@ import { Component, HostListener, OnInit } from '@angular/core' | |||
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { LoadingBarService } from '@ngx-loading-bar/core' | 4 | import { LoadingBarService } from '@ngx-loading-bar/core' |
5 | import { Notifier } from '@app/core' | 5 | import { Notifier } from '@app/core' |
6 | import { VideoConstant, VideoPrivacy } from '../../../../../shared/models/videos' | ||
7 | import { ServerService } from '../../core' | 6 | import { ServerService } from '../../core' |
8 | import { FormReactive } from '../../shared' | 7 | import { FormReactive } from '../../shared' |
9 | import { VideoEdit } from '../../shared/video/video-edit.model' | 8 | import { VideoEdit } from '../../shared/video/video-edit.model' |
@@ -23,8 +22,6 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
23 | video: VideoEdit | 22 | video: VideoEdit |
24 | 23 | ||
25 | isUpdatingVideo = false | 24 | isUpdatingVideo = false |
26 | videoPrivacies: VideoConstant<VideoPrivacy>[] = [] | ||
27 | explainedVideoPrivacies: VideoConstant<VideoPrivacy>[] = [] | ||
28 | userVideoChannels: { id: number, label: string, support: string }[] = [] | 25 | userVideoChannels: { id: number, label: string, support: string }[] = [] |
29 | schedulePublicationPossible = false | 26 | schedulePublicationPossible = false |
30 | videoCaptions: VideoCaptionEdit[] = [] | 27 | videoCaptions: VideoCaptionEdit[] = [] |
@@ -49,9 +46,6 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
49 | ngOnInit () { | 46 | ngOnInit () { |
50 | this.buildForm({}) | 47 | this.buildForm({}) |
51 | 48 | ||
52 | this.serverService.videoPrivaciesLoaded | ||
53 | .subscribe(() => this.videoPrivacies = this.serverService.getVideoPrivacies()) | ||
54 | |||
55 | this.route.data | 49 | this.route.data |
56 | .pipe(map(data => data.videoData)) | 50 | .pipe(map(data => data.videoData)) |
57 | .subscribe(({ video, videoChannels, videoCaptions }) => { | 51 | .subscribe(({ video, videoChannels, videoCaptions }) => { |
@@ -59,15 +53,6 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
59 | this.userVideoChannels = videoChannels | 53 | this.userVideoChannels = videoChannels |
60 | this.videoCaptions = videoCaptions | 54 | this.videoCaptions = videoCaptions |
61 | 55 | ||
62 | // We cannot set private a video that was not private | ||
63 | if (this.video.privacy !== VideoPrivacy.PRIVATE) { | ||
64 | this.videoPrivacies = this.videoPrivacies.filter(p => p.id !== VideoPrivacy.PRIVATE) | ||
65 | } else { // We can schedule video publication only if it it is private | ||
66 | this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE | ||
67 | } | ||
68 | |||
69 | this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies) | ||
70 | |||
71 | const videoFiles = (video as VideoDetails).files | 56 | const videoFiles = (video as VideoDetails).files |
72 | if (videoFiles.length > 1) { // Already transcoded | 57 | if (videoFiles.length > 1) { // Already transcoded |
73 | this.waitTranscodingEnabled = false | 58 | this.waitTranscodingEnabled = false |