xeruf / monsterutilities

Browse, stream and download Monstercat Songs
GNU General Public License v3.0
31 stars 2 forks source link

Downloader should error out when downloaded file type is not music #77

Closed defvs closed 5 years ago

defvs commented 5 years ago

Multiple ways to achieve this : Size check, if it's less than half a meg, highly probable that it's not music.

Better solution would be to check the "content-type" header of the server's response.

xeruf commented 5 years ago

Yes, implementing the latter would definitely be a good idea!

defvs commented 5 years ago

I'll do, assign me. I still cannot do it myself lol.

xeruf commented 5 years ago

here boi: https://github.com/Xerus2000/monsterutilities/invitations

defvs commented 5 years ago

Got it thanks, didn't receive it apparently.

defvs commented 5 years ago

So here are my findings : All tracks before Tails & Pauline Herr - Ghosted returns application/octet-stream and not the common MIME types (audio/mpeg, audio/flac, audio/wav). I haven't found a single one of thoses glitched flac yet so it's hard to tell if my fix is working or not. Check my PR for it.