-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add FLAC support #111
base: master
Are you sure you want to change the base?
Add FLAC support #111
Conversation
Small comment to mention that I have tested this (with a non-free account) and it works for me ! thanks a lot ! |
sorry for not taking care :( |
yea, thanks for the PR. I just need some time for this. |
it seems that for me, I can only download 128kbps not 320 |
Worked well with a premium account!. With a free account deezer returned 403 if I tried to download sound_quality = 3 (flac) |
Maybe I'm a noob, but how does one run the PR? Do you have to clone down the commits and run through the poetry build process? |
if you're running with docker you can use the image I have built : mryan/deezer-downloader:shamu |
Hey @10p3 Can you tell my when/how often this case is relevant? if not data['data'][0].get('media'):
print(data)
sleep((random.random()+2**i))
return get_song_url(song, i+1) I also have some troubles understanding the logic of if i == 1 and song.get('FALLBACK'):
song = song['FALLBACK']
Before you change anything: I'm currently trying to review/merge #133. I fix some things like the Exception handling and smaller issues. The MR contains parts of your changes. So let's merge that before. Right now I'm failing to push into branch of the MR... |
Hi
As for the random sleep, honestly I don't recall - sorry. Maybe I was thinking ratelimits on a large number of requests? If there isn't a fallback then I'd imagine it would fail like i=1 unless there was some other network issue or something, it might make more sense to just raise the exception immediately if there isn't a fallback. sorry not sure I'm any help with your force-push issue, good luck though. |
I've used this to download a couple of playlists and it seems to work so far (using the free trial).
It'd be good if someone could test that it doesn't break operation with free accounts since i don't currently have one.
I've yet to observe any songs with AAC as an option so the change to the "exists already" check doesn't handle that yet.
I'm not sure how robust the error handling is if the server returns results in an unexpected format.
The web client gets media urls with a seperate API call using TRACK_TOKEN from the song data, the encryption on FLACs seems unchanged.
Some songs have a "Fallback" to a different ID and do not allow downloads using the original id, this is currently handled after failing on the original file but it might be worth not trying the original if a fallback is supplied.