aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/videos/+video-watch/modal/video-download.component.ts5
1 files changed, 4 insertions, 1 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 1a73ea6df..3b409e2e6 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,7 +13,7 @@ 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 = -1 16 resolution: number | string = -1
17 17
18 constructor () { 18 constructor () {
19 // empty 19 // empty
@@ -32,6 +32,9 @@ export class VideoDownloadComponent implements OnInit {
32 } 32 }
33 33
34 download () { 34 download () {
35 // HTML select send us a string, so convert it to a number
36 this.resolution = parseInt(this.resolution.toString(), 10)
37
35 const file = this.video.files.find(f => f.resolution === this.resolution) 38 const file = this.video.files.find(f => f.resolution === this.resolution)
36 if (!file) { 39 if (!file) {
37 console.error('Could not find file with resolution %d.', this.resolution) 40 console.error('Could not find file with resolution %d.', this.resolution)