Skip to content

Commit

Permalink
Merge pull request #232 from pm96/feature/publishToSubscriptionFeedAn…
Browse files Browse the repository at this point in the history
…dNotifySubscribers

Added the possibility to toggle off the checkbox for publish to subscription feed and notify subscribers
  • Loading branch information
fawazahmed0 authored Nov 12, 2023
2 parents 3fe2db7 + d714cc1 commit 1903ceb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface Video {
isNotForKid?: boolean
isChannelMonetized?: boolean
gameTitleSearch?: string
publishToSubscriptionFeedAndNotifySubscribers?: boolean
gameSelector?: ( arg0: GameData ) => Promise<boolean> | null
}

Expand Down
5 changes: 5 additions & 0 deletions src/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ async function uploadVideo(videoJSON: Video, messageTransport: MessageTransport)
} catch (err) {}
}

// Set pusblish to subscription feed and notify subscribers to false
if(videoJSON.publishToSubscriptionFeedAndNotifySubscribers === false) {
await page.waitForSelector("#notify-subscribers > div:nth-child(1) > div:nth-child(1)")
await page.click("#notify-subscribers > div:nth-child(1) > div:nth-child(1)")
}
// Selecting video language
if (videoLang) {
const langHandler = await page.$x("//*[normalize-space(text())='Video language']")
Expand Down

0 comments on commit 1903ceb

Please sign in to comment.