From 3d79e7ed935a6e2e3312545b101e4de408104dd1 Mon Sep 17 00:00:00 2001 From: localhost Date: Sat, 16 Aug 2025 13:24:26 +0300 Subject: [PATCH] add support for premieres on channel pages --- src/router/video.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/video.ts b/src/router/video.ts index 8ac847a..e2b9c0f 100644 --- a/src/router/video.ts +++ b/src/router/video.ts @@ -54,7 +54,7 @@ app.get('/channel/:id', async ({ params: { id }, error }) => { id: video.video_id, title: video.title.text, thumbnail: video.thumbnails[0].url, - published: (video.published.text.endsWith('ago') ? convertRelativeToDate(video.published.text) : new Date(video.published.text)).toISOString().slice(0, 10) + published: video.upcoming?.slice(0, 10) || (video.published.text.endsWith('ago') ? convertRelativeToDate(video.published.text) : new Date(video.published.text)).toISOString().slice(0, 10) })) archived.forEach(v => {