tombulled / python-youtube-music

Python 3 YouTube Music Web API Client
GNU General Public License v3.0
64 stars 13 forks source link

replace possible illegal characters forming the downloaded file name #12

Closed fmigneault closed 3 years ago

fmigneault commented 3 years ago

In the off chance that the track detail was missing and that the info defaulted to using the title while metadata did not provide a clean version of it, the resulting info title could be any character (eg: My Song/Music), based on the uploaded video title.

Replace those problem characters by underscores to avoid incorrect paths. In above case, it was seeing it as a sub directory.