-
Notifications
You must be signed in to change notification settings - Fork 223
Description
In the current non-dev code disc splitting doesn't work. It instead errors and this was mentioned in an old PR where they attempted to submit a fix but instead it looks like it got mucked up pretty bad so nothing got merged. I managed to create a patch on bgeorgakas's fork (my own fork is a fork of theirs) and it should fix the issue here as the impacted code isn't touched there.
Issue:
Traceback (most recent call last):
File "/home/shinji/.pyenv/versions/3.11.11/envs/zotify/lib/python3.11/site-packages/zotify/track.py", line 163, in download_track
output_template = output_template.replace("{"+k+"}", fix_filename(extra_keys[k]))
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PurePosixPath' object has no attribute 'replace'
Cause: This function is expecting a string instead of a PurePath object.
Fix: Cast it into a string so that it can be processed
Secondary issue: Output template gets broken during processing so ffmpeg ends up with the wrong path.
I fixed this as well so now it gets the correct information and the output template is generated properly. There may be a more elegant way to do this. I'm not exactly good at python programming but know enough to get my way around and there are plenty of docs around to tell me how things work.
PR Fix: #264