aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-edit/video-update.component.ts2
-rw-r--r--client/src/app/videos/+video-watch/modal/video-download.component.html4
-rw-r--r--client/src/app/videos/+video-watch/modal/video-download.component.ts10
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.html8
4 files changed, 12 insertions, 12 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 2fc09278c..6cd204f72 100644
--- a/client/src/app/videos/+video-edit/video-update.component.ts
+++ b/client/src/app/videos/+video-edit/video-update.component.ts
@@ -72,7 +72,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
72 ] 72 ]
73 73
74 // We cannot set private a video that was not private 74 // We cannot set private a video that was not private
75 if (video.privacy !== VideoPrivacy.PRIVATE) { 75 if (video.privacy.id !== VideoPrivacy.PRIVATE) {
76 const newVideoPrivacies = [] 76 const newVideoPrivacies = []
77 for (const p of this.videoPrivacies) { 77 for (const p of this.videoPrivacies) {
78 if (p.id !== VideoPrivacy.PRIVATE) newVideoPrivacies.push(p) 78 if (p.id !== VideoPrivacy.PRIVATE) newVideoPrivacies.push(p)
diff --git a/client/src/app/videos/+video-watch/modal/video-download.component.html b/client/src/app/videos/+video-watch/modal/video-download.component.html
index f8f17a471..617892b11 100644
--- a/client/src/app/videos/+video-watch/modal/video-download.component.html
+++ b/client/src/app/videos/+video-watch/modal/video-download.component.html
@@ -9,8 +9,8 @@
9 9
10 <div class="modal-body"> 10 <div class="modal-body">
11 <div class="peertube-select-container"> 11 <div class="peertube-select-container">
12 <select [(ngModel)]="resolution"> 12 <select [(ngModel)]="resolutionId">
13 <option *ngFor="let file of video.files" [value]="file.resolution">{{ file.resolutionLabel }}</option> 13 <option *ngFor="let file of video.files" [value]="file.resolution.id">{{ file.resolution.label }}</option>
14 </select> 14 </select>
15 </div> 15 </div>
16 16
diff --git a/client/src/app/videos/+video-watch/modal/video-download.component.ts b/client/src/app/videos/+video-watch/modal/video-download.component.ts
index 3b409e2e6..b06a7eef1 100644
--- a/client/src/app/videos/+video-watch/modal/video-download.component.ts
+++ b/client/src/app/videos/+video-watch/modal/video-download.component.ts
@@ -13,14 +13,14 @@ export class VideoDownloadComponent implements OnInit {
13 @ViewChild('modal') modal: ModalDirective 13 @ViewChild('modal') modal: ModalDirective
14 14
15 downloadType: 'direct' | 'torrent' = 'torrent' 15 downloadType: 'direct' | 'torrent' = 'torrent'
16 resolution: number | string = -1 16 resolutionId: number | string = -1
17 17
18 constructor () { 18 constructor () {
19 // empty 19 // empty
20 } 20 }
21 21
22 ngOnInit () { 22 ngOnInit () {
23 this.resolution = this.video.files[0].resolution 23 this.resolutionId = this.video.files[0].resolution.id
24 } 24 }
25 25
26 show () { 26 show () {
@@ -33,11 +33,11 @@ export class VideoDownloadComponent implements OnInit {
33 33
34 download () { 34 download () {
35 // HTML select send us a string, so convert it to a number 35 // HTML select send us a string, so convert it to a number
36 this.resolution = parseInt(this.resolution.toString(), 10) 36 this.resolutionId = parseInt(this.resolutionId.toString(), 10)
37 37
38 const file = this.video.files.find(f => f.resolution === this.resolution) 38 const file = this.video.files.find(f => f.resolution.id === this.resolutionId)
39 if (!file) { 39 if (!file) {
40 console.error('Could not find file with resolution %d.', this.resolution) 40 console.error('Could not find file with resolution %d.', this.resolutionId)
41 return 41 return
42 } 42 }
43 43
diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html
index 82f148e9b..6a7da0614 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.html
+++ b/client/src/app/videos/+video-watch/video-watch.component.html
@@ -122,7 +122,7 @@
122 Privacy 122 Privacy
123 </span> 123 </span>
124 <span class="video-attribute-value"> 124 <span class="video-attribute-value">
125 {{ video.privacyLabel }} 125 {{ video.privacy.label }}
126 </span> 126 </span>
127 </div> 127 </div>
128 128
@@ -131,7 +131,7 @@
131 Category 131 Category
132 </span> 132 </span>
133 <span class="video-attribute-value"> 133 <span class="video-attribute-value">
134 {{ video.categoryLabel }} 134 {{ video.category.label }}
135 </span> 135 </span>
136 </div> 136 </div>
137 137
@@ -140,7 +140,7 @@
140 Licence 140 Licence
141 </span> 141 </span>
142 <span class="video-attribute-value"> 142 <span class="video-attribute-value">
143 {{ video.licenceLabel }} 143 {{ video.licence.label }}
144 </span> 144 </span>
145 </div> 145 </div>
146 146
@@ -149,7 +149,7 @@
149 Language 149 Language
150 </span> 150 </span>
151 <span class="video-attribute-value"> 151 <span class="video-attribute-value">
152 {{ video.languageLabel }} 152 {{ video.language.label }}
153 </span> 153 </span>
154 </div> 154 </div>
155 155