Skip to content

Using correct filenames for vorbis files#75

Open
LlinksRechts wants to merge 2 commits into
LaurenceRawlings:mainfrom
LlinksRechts:main
Open

Using correct filenames for vorbis files#75
LlinksRechts wants to merge 2 commits into
LaurenceRawlings:mainfrom
LlinksRechts:main

Conversation

@LlinksRechts
Copy link
Copy Markdown

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.

Comment thread 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),
Copy link
Copy Markdown

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
Copy Markdown
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.

2 participants