Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set an output template for media download filename #140

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

philmcmahon
Copy link
Contributor

What does this change?

I found an issue where the filename of the file downloaded by yt-dlp isn't consistent - for videos from some services it included the file extension whereas for others (in this case bluesky) it didn't, which resulted in the upload to s3 step failing as it had the wrong filename. This PR fixes that by explicitly including the file extension in the downloaded filename using an output template.

How to test

Tested on CODE - it works

@philmcmahon philmcmahon requested a review from a team as a code owner February 21, 2025 12:13
@@ -17,7 +17,7 @@ const extractInfoJson = (infoJsonPath: string): MediaMetadata => {
title: json.title,
extension: json.ext,
filename: json.filename,
mediaPath: `${json.filename}.${json.ext}`,
mediaPath: `${json.filename}`,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the .${json.ext} is not longer needed here as 'ext' always gets included in the filename thanks to the output template

@philmcmahon philmcmahon merged commit cb0f053 into main Feb 21, 2025
6 checks passed
@philmcmahon philmcmahon deleted the media-download-consistent-name branch February 21, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants