Checks for isUpcoming
This commit is contained in:
@@ -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() || '',
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user