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:
@@ -146,6 +146,9 @@ export function parseVideo(data?: any): YouTubeVideo {
|
||||
artist: Boolean(badge?.includes('artist'))
|
||||
},
|
||||
uploadedAt: data.videoRenderer.publishedTimeText?.simpleText ?? null,
|
||||
upcoming: data.videoRenderer.upcomingEventData?.startTime
|
||||
? new Date(parseInt(data.videoRenderer.upcomingEventData.startTime) * 1000)
|
||||
: undefined,
|
||||
views: data.videoRenderer.viewCountText?.simpleText?.replace(/\D/g, '') ?? 0,
|
||||
live: durationText ? false : true
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user