Skip to content

Commit

Permalink
limit youtube title to 100 chars
Browse files Browse the repository at this point in the history
related to #483
  • Loading branch information
MrBrax committed Dec 11, 2023
1 parent aeaba92 commit a5c9733
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion server/src/Exporters/YouTube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ export class YouTubeExporter extends BaseExporter {
"Quota exceeded. Enable override in config to force upload."
);

const finalTitle = this.getFormattedTitle();
let finalTitle = this.getFormattedTitle();

// youtube max title length is 100
if (finalTitle.length > 100) {
finalTitle = finalTitle.substring(0, 100);
log(
LOGLEVEL.WARNING,
"YouTubeExporter.export",
`Title too long, trimming to 100 characters: ${finalTitle}`
);
}

// const service = google.youtube("v3");
const service = new youtube_v3.Youtube({
Expand Down

0 comments on commit a5c9733

Please sign in to comment.