@ViewChild('modal') modal: ModalDirective
downloadType: 'direct' | 'torrent' = 'torrent'
- resolution = -1
+ resolution: number | string = -1
constructor () {
// empty
}
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)