From 09700934b90e2ac7b1b9ed1694d9d4d52735e2e1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Mar 2018 11:04:40 +0100 Subject: BEARKING CHANGE: Update videos API response before beta --- .../app/videos/+video-watch/modal/video-download.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/app/videos/+video-watch/modal/video-download.component.ts') 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 { @ViewChild('modal') modal: ModalDirective downloadType: 'direct' | 'torrent' = 'torrent' - resolution: number | string = -1 + resolutionId: number | string = -1 constructor () { // empty } ngOnInit () { - this.resolution = this.video.files[0].resolution + this.resolutionId = this.video.files[0].resolution.id } show () { @@ -33,11 +33,11 @@ export class VideoDownloadComponent implements OnInit { download () { // HTML select send us a string, so convert it to a number - this.resolution = parseInt(this.resolution.toString(), 10) + this.resolutionId = parseInt(this.resolutionId.toString(), 10) - const file = this.video.files.find(f => f.resolution === this.resolution) + const file = this.video.files.find(f => f.resolution.id === this.resolutionId) if (!file) { - console.error('Could not find file with resolution %d.', this.resolution) + console.error('Could not find file with resolution %d.', this.resolutionId) return } -- cgit v1.2.3