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

Unable to find a suitable output format for #6

Open
ricardroberg opened this issue Oct 31, 2021 · 2 comments
Open

Unable to find a suitable output format for #6

ricardroberg opened this issue Oct 31, 2021 · 2 comments

Comments

@ricardroberg
Copy link

I changed line 24 from -3 to -4 and worked.

new_filename = default_filename[0:-4] + "mp3"

@goors
Copy link

goors commented Aug 30, 2022

Same here. This fixed it.

@dilettante8
Copy link

dilettante8 commented Feb 16, 2023

The code below removes everything after the rightmost dot (.) and appends ".mp3" behind the file name. This works for even titles with dot in the name.

new_filename = re.sub(r".[^.]+$", "", default_filename) + ".mp3"

e.g.

default_filename = "Seven Starts ft. Cyber.3gpp"

new_filename = "Seven Starts ft. Cyber.mp3"

default_filename = "Counting Stars.mp4"

new_filename = "Counting Stars.mp3"

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

No branches or pull requests

3 participants