aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/modal/video-download.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/+video-watch/modal/video-download.component.ts')
-rw-r--r--client/src/app/videos/+video-watch/modal/video-download.component.ts10
1 files changed, 5 insertions, 5 deletions
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