From 415c0c0f2cbc32a5d43da438d5c1830feefb1f4b Mon Sep 17 00:00:00 2001 From: killer069 <65385476+killer069@users.noreply.github.com> Date: Mon, 23 Aug 2021 15:22:18 +0530 Subject: [PATCH] feat new properties --- play-dl/YouTube/classes/Video.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/play-dl/YouTube/classes/Video.ts b/play-dl/YouTube/classes/Video.ts index 0d51d22..40ce821 100644 --- a/play-dl/YouTube/classes/Video.ts +++ b/play-dl/YouTube/classes/Video.ts @@ -37,8 +37,8 @@ export class Video { url? : string; title?: string; description?: string; - durationFormatted: string; - duration: number; + durationRaw: string; + durationInSec: number; uploadedAt?: string; views: number; thumbnail?: Thumbnail; @@ -57,8 +57,8 @@ export class Video { this.url = `https://www.youtube.com/watch?v=${this.id}` this.title = data.title || undefined; this.description = data.description || undefined; - this.durationFormatted = data.duration_raw || "0:00"; - this.duration = (data.duration < 0 ? 0 : data.duration) || 0; + this.durationRaw = data.duration_raw || "0:00"; + this.durationInSec = (data.duration < 0 ? 0 : data.duration) || 0; this.uploadedAt = data.uploadedAt || undefined; this.views = parseInt(data.views) || 0; this.thumbnail = data.thumbnail || {}; @@ -84,8 +84,8 @@ export class Video { url: this.url, title: this.title, description: this.description, - durationInSec: this.duration, - durationRaw: this.durationFormatted, + durationInSec: this.durationInSec, + durationRaw: this.durationRaw, uploadedAt: this.uploadedAt, thumbnail: this.thumbnail?.toJSON(), channel: {