From 33255d779619df8869f7b2ec07f8a78a4b8b7c51 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Sun, 26 Oct 2025 12:29:24 +0700 Subject: [PATCH] feat: youtube made for kids --- .../providers/youtube/youtube.provider.tsx | 23 +++++++++++++++++++ .../youtube.settings.dto.ts | 4 ++++ .../integrations/social/youtube.provider.ts | 6 ++--- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/apps/frontend/src/components/new-launch/providers/youtube/youtube.provider.tsx b/apps/frontend/src/components/new-launch/providers/youtube/youtube.provider.tsx index d9772d3a..03573774 100644 --- a/apps/frontend/src/components/new-launch/providers/youtube/youtube.provider.tsx +++ b/apps/frontend/src/components/new-launch/providers/youtube/youtube.provider.tsx @@ -25,6 +25,17 @@ const type = [ value: 'unlisted', }, ]; + +const madeForKids = [ + { + label: 'No', + value: 'no', + }, + { + label: 'Yes', + value: 'yes', + }, +]; const YoutubeSettings: FC = () => { const { register, control } = useSettings(); return ( @@ -42,6 +53,18 @@ const YoutubeSettings: FC = () => { ))} +
MediaDto) diff --git a/libraries/nestjs-libraries/src/integrations/social/youtube.provider.ts b/libraries/nestjs-libraries/src/integrations/social/youtube.provider.ts index bf66dc16..36bffc53 100644 --- a/libraries/nestjs-libraries/src/integrations/social/youtube.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/youtube.provider.ts @@ -48,9 +48,7 @@ const clientAndYoutube = () => { return { client, youtube, oauth2, youtubeAnalytics }; }; -@Rules( - 'YouTube must have on video attachment, it cannot be empty' -) +@Rules('YouTube must have on video attachment, it cannot be empty') export class YoutubeProvider extends SocialAbstract implements SocialProvider { override maxConcurrentJob = 1; // YouTube has strict upload quotas identifier = 'youtube'; @@ -225,6 +223,8 @@ export class YoutubeProvider extends SocialAbstract implements SocialProvider { }, status: { privacyStatus: settings.type, + selfDeclaredMadeForKids: + settings.selfDeclaredMadeForKids === 'yes', }, }, media: {