ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix file downloading
Chocobozzz00336945ce75
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.tsindex 1a73ea6df0..3b409e2e66 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 {@ViewChild('modal') modal: ModalDirectivedownloadType: 'direct' | 'torrent' = 'torrent'- resolution = -1+ resolution: number | string = -1constructor () {// empty@@ -32,6 +32,9 @@ 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)+const file = this.video.files.find(f => f.resolution === this.resolution)if (!file) {console.error('Could not find file with resolution %d.', this.resolution)