jo1gi / audiobook-dl

Audiobook CLI downloader
GNU General Public License v3.0
248 stars 43 forks source link

error when combining mp3s: folder name replication not seen by script #27

Closed catfordfire closed 1 year ago

catfordfire commented 1 year ago

Hi - has been working really well, but now I'm getting the following error. It seems that the directory folder name is being duplicated (but it's not finding it because the extra folder name doesn't exist when the files are saved). mp3s are being saved fine, but not being converted. Actual folder name is BOOK NAME/BOOK NAME - Part 1.mp3:

Downloading 26 files - BOOK NAME ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% Converting files Traceback (most recent call last): File "/opt/homebrew/lib/python3.10/site-packages/mutagen-1.46.0-py3.10.egg/mutagen/_util.py", line 250, in _openfile fileobj = open(filename, "rb+" if writable else "rb") FileNotFoundError: [Errno 2] No such file or directory: 'BOOK NAME/BOOK NAME/BOOK NAME - Part 1.mp3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/homebrew/bin/audiobook-dl", line 33, in sys.exit(load_entry_point('audiobook-dl==0.4.3', 'console_scripts', 'audiobook-dl')()) File "/opt/homebrew/lib/python3.10/site-packages/audiobook_dl-0.4.3-py3.10.egg/audiobookdl/main.py", line 56, in run File "/opt/homebrew/lib/python3.10/site-packages/audiobook_dl-0.4.3-py3.10.egg/audiobookdl/main.py", line 77, in run_on_url File "/opt/homebrew/lib/python3.10/site-packages/audiobook_dl-0.4.3-py3.10.egg/audiobookdl/output/download.py", line 50, in download File "/opt/homebrew/lib/python3.10/site-packages/audiobook_dl-0.4.3-py3.10.egg/audiobookdl/output/download.py", line 173, in add_metadata_to_dir File "/opt/homebrew/lib/python3.10/site-packages/audiobook_dl-0.4.3-py3.10.egg/audiobookdl/output/metadata/init.py", line 7, in add_metadata File "/opt/homebrew/lib/python3.10/site-packages/audiobook_dl-0.4.3-py3.10.egg/audiobookdl/output/metadata/id3.py", line 34, in add_id3_metadata File "/opt/homebrew/lib/python3.10/site-packages/mutagen-1.46.0-py3.10.egg/mutagen/_file.py", line 47, in init self.load(*args, **kwargs) File "/opt/homebrew/lib/python3.10/site-packages/mutagen-1.46.0-py3.10.egg/mutagen/_util.py", line 153, in wrapper with _openfile(self, filething, filename, fileobj, File "/opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in enter return next(self.gen) File "/opt/homebrew/lib/python3.10/site-packages/mutagen-1.46.0-py3.10.egg/mutagen/_util.py", line 271, in _openfile raise MutagenError(e) mutagen.MutagenError: [Errno 2] No such file or directory: 'BOOK NAME/BOOK NAME/BOOK NAME - Part 1.mp3'

jo1gi commented 1 year ago

I think I fixed it (commit ce03cac). Hope it works.

catfordfire commented 1 year ago

Beautiful! Damn, you're fast :) Thanks!!

jo1gi commented 1 year ago

You're welcome