Checks for isUpcoming

This commit is contained in:
WardPearce
2025-07-26 19:59:04 +12:00
parent 06676d16c3
commit e2abf0af14
3 changed files with 7 additions and 2 deletions
@@ -2,6 +2,7 @@
"enabled": "Enabled",
"disabled": "Disabled",
"premium": "Premium YouTube content can't be watched on Materialious.",
"isUpcoming": "Video is not in a watchable state yet.",
"copyUrl": "Copy URL",
"loadMore": "Load more",
"views": "views",
@@ -172,8 +172,6 @@ export async function patchYoutubeJs(videoId: string): Promise<VideoPlay> {
});
}
console.log(video);
return {
type: 'video',
title: video.primary_info.title?.toString() || '',
+6
View File
@@ -28,6 +28,12 @@ export async function getWatchDetails(videoId: string, url: URL) {
if (video.premium) {
error(400, get(_)('premium'));
return;
}
if (video.isUpcoming) {
error(400, get(_)('isUpcoming'));
return;
}
let personalPlaylists;