vitiko98 / qobuz-dl

A complete Lossless and Hi-Res music downloader for Qobuz
GNU General Public License v3.0
1.45k stars 192 forks source link

Slash in Albumname gives wrong dir-name #225

Closed morbificagent closed 1 year ago

morbificagent commented 1 year ago

Hi there and first of all great work!

I am using qobuz-dl all the time :-)

but today i had a Problem with downloading albums with a / in the name. It is recognized as "New dir" and so i get

Artist/Album 1/212/Song 1.flac

instead of Artist/"Album 1/212"/Song 1.flac

would be great if slashes are converted to "-" or something like that so it doesnt break the structure here

zatmonkey commented 1 year ago

There's more to it, basically the use of ":" or "\" or "\/" will be causing issues

Downloading: I:Cube - Adore
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts\qobuz-dl.exe\__main__.py", line 7, in <module>
  File "C:\Users\alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\qobuz_dl\cli.py", line 176, in main
    _handle_commands(qobuz, arguments)
  File "C:\Users\alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\qobuz_dl\cli.py", line 83, in _handle_commands
    qobuz.download_list_of_urls(arguments.SOURCE)
  File "C:\Users\alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\qobuz_dl\core.py", line 180, in download_list_of_urls
    self.handle_url(url)
  File "C:\Users\alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\qobuz_dl\core.py", line 160, in handle_url
    self.download_from_id(
  File "C:\Users\alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\qobuz_dl\core.py", line 105, in download_from_id
    dloader.download_id_by_type(not album)
  File "C:\Users\alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\qobuz_dl\downloader.py", line 63, in download_id_by_type
    self.download_track()
  File "C:\Users\alex\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\qobuz_dl\downloader.py", line 162, in download_track
    os.makedirs(dirn, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'I:/'