Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Cannot download a song with an artist with a / in it #22

Open
darrenshu opened this issue Oct 7, 2013 · 2 comments
Open

Cannot download a song with an artist with a / in it #22

darrenshu opened this issue Oct 7, 2013 · 2 comments

Comments

@darrenshu
Copy link

There is an issue on line 223, specifically https://github.com/jacktheripper51/groove-dl/blob/master/python/groove.py#L223

if s[songid]["ArtistName"] contains a "/", (such as the band AC/DC), then the file cannot be saved since wget will report an error "No such file or directory"

I worked around this issue by first importing re, then changing cmd to
cmd = 'wget --post-data=streamKey=%s -O "%s - %s.mp3" "http://%s/stream.php"' % (stream["streamKey"], re.sub(r'+|/+', '', s[songid]["ArtistName"]), re.sub(r'+|/+', '', s[songid]["SongName"]), stream["ip"]) #Run wget to download the song

@gsteph
Copy link
Owner

gsteph commented Oct 19, 2013

Seems like the solution is too complicated for the need. Why can't we just s[songid]["ArtistName"].replace('/','') and likewise for SongName?

@darrenshu
Copy link
Author

That's probably a sufficient solution. I was originally thinking there may be some problem on other OS platforms which are more stringent on filenames such as Windows where there may be additional translation for the filename (e.g. filtering things like '?').

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants