yask123 / Instant-Music-Downloader

🎷 Downloads Music From The Web
http://iyask.me/Instant-Music-Downloader/
1.41k stars 161 forks source link

Sometimes instantmusic sends eof before download has finished #135

Open NightMachinery opened 5 years ago

NightMachinery commented 5 years ago

To reproduce: Use “gaston song”, then select “Mix - Beauty and the Beast - Gaston”. (For me, it’s the 17th item now.) instantmusic then terminates as if it had downloaded the song normally (which for me means the following text): Downloading Fixing id3 tags a bytes-like object is required, not 'str' couldnt get album art

But the youtube download starts after this: B1A11A78-F43D-43B1-86EA-12A594784A49

The problem is that I’m using instantmusic with pexpect, and the untimely eof makes pexpect think the process has finished when it has not.

NightMachinery commented 5 years ago

I think this might be solved if we use youtube-dl directly from Python instead of using it via CLI.

NightMachinery commented 5 years ago

I just checked, https://m.youtube.com/watch?v=VuJTqmpBnI0&list=RDVuJTqmpBnI0&start_radio=1 is a playlist. Perhaps that’s why this is failing. Youtube-dl does have an option to ignore playlists and just download the first item ...