mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Add support for upcoming videos, adding the upcoming property to YouTubeVideo
This commit is contained in:
@@ -38,6 +38,10 @@ interface VideoOptions {
|
||||
* YouTube Video Uploaded Date
|
||||
*/
|
||||
uploadedAt?: string;
|
||||
/**
|
||||
* If the video is upcoming or a premiere that isn't currently live, this will contain the premiere date, for watch page playlists this will be true, it defaults to undefined
|
||||
*/
|
||||
upcoming?: Date | true;
|
||||
/**
|
||||
* YouTube Views
|
||||
*/
|
||||
@@ -115,6 +119,10 @@ export class YouTubeVideo {
|
||||
* YouTube Video Uploaded Date
|
||||
*/
|
||||
uploadedAt?: string;
|
||||
/**
|
||||
* If the video is upcoming or a premiere that isn't currently live, this will contain the premiere date, for watch page playlists this will be true, it defaults to undefined
|
||||
*/
|
||||
upcoming?: Date | true;
|
||||
/**
|
||||
* YouTube Views
|
||||
*/
|
||||
@@ -166,6 +174,7 @@ export class YouTubeVideo {
|
||||
this.durationRaw = data.duration_raw || '0:00';
|
||||
this.durationInSec = (data.duration < 0 ? 0 : data.duration) || 0;
|
||||
this.uploadedAt = data.uploadedAt || undefined;
|
||||
this.upcoming = data.upcoming;
|
||||
this.views = parseInt(data.views) || 0;
|
||||
const thumbnails = [];
|
||||
for (const thumb of data.thumbnails) {
|
||||
|
||||
Reference in New Issue
Block a user