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

Using correct filenames for vorbis files #75

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LlinksRechts
Copy link

When downloading songs as ogg/vorbis, the format specified on the command line is vorbis. However, files of this type have the extension .ogg, so .{download_format} will not work (this will look for a file called {id}.vorbis, which it of course cannot find, and redownload the same songs over and over again).
This pull request introduces a map of format names to file extensions, currently only populated with vorbis->ogg. All formats not found in this map will be used as an extension like previously.

savify/savify.py Outdated
output_temp = output_temp.replace('%(ext)s', self.download_format)
output_temp = output_temp.replace(
'%(ext)s',
download_extension_map.get(self.download_format, self.download_format),

Choose a reason for hiding this comment

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

There's an error line 246. It should be:

output_temp = output_temp.replace('%(ext)s', format_extension_map.get(self.download_format, self.download_format),)

Copy link
Author

Choose a reason for hiding this comment

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

youre right, idk where this comes from - fixed

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.

None yet

2 participants