Closed dangpzanco closed 6 years ago
Thanks for this contribution. I do not have Windows installation to test this fix. However, it does not break anything on Linux side, so I merge it to the develop branch. It will be included in the upcoming v0.2.1 in a couple of days.
If
tmp_file
is not removed beforeyoutube_audio.download()
is called, aFileExistsError
is raised on the Windows platform. Needs to be tested on Linux and Mac, but looks like it should work fine.Reference Issue
No reference issue (that I know of). I just found this today when going thru the tutorials.
What does this implement/fix? Explain your changes.
The fix is to get
tmp_file.name
and then calltmp_file.close()
, so we keep a safe temp filename and delete the empty file before we download the audio from Youtube.