Skip to content

Commit

Permalink
Document why we wipe the file
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Feb 24, 2025
1 parent 4051ec2 commit cbd208f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/media-download/src/yt-dlp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const downloadMedia = async (
const proxyParams = proxyUrl ? ['--proxy', proxyUrl] : [];
try {
const filepathLocation = `${workingDirectory}/${id}.txt`;
// yt-dlp --print-to-file appends to the file, so wipe it first
fs.writeFileSync(filepathLocation, '');
await runSpawnCommand(
'downloadMedia',
Expand Down

0 comments on commit cbd208f

Please sign in to comment.