Closed UlyssesZh closed 9 months ago
What is the reason of the reversion? Do I need to change anything?
@UlyssesZh Yes, please make the replace on the .move_file()
method instead of the download methods. It shoud take only one call to .replace()
in line 244:
move_to = self._sanitize_file_path(destination / output.format(**context).replace("/", self.slash_replacement))
Making that change would be problematic because the template itself may contain slashes that the user want. The unwanted slashes are those in the context. I think my original approach was better.
So what exactly was the reason of the reversion? If you could have not reverted, you can just revert #16.
I'm still seeing issues with tracks with slashes. Track 17 of this album titled "VANTAGE // - Get Ready".
You will need #14 merged to test this otherwise the album won't download
~/bandcamper# bandcamper --no-fallback -f flac -v https://stratfordcompilations.bandcamp.com/album/stratford-ct-1-yr-anniversary-compilation
[?] Searching available downloads for URL https://stratfordcompilations.bandcamp.com/album/stratford-ct-1-yr-anniversary-compilation
[+] Free download found! Downloading Ѕtratford Ct. - Stratford Ct. | 1 yr Anniversary Compilation
flac.zip (687.1MiB) [####################################] 100%
...
[+] New file: /root/bandcamper/Ѕtratford Ct./Stratford Ct. | 1 yr Anniversary Compilation/17 - VANTAGE / - Get Ready.flac
...
[+] New directory: /root/bandcamper/Ѕtratford Ct./Stratford Ct. | 1 yr Anniversary Compilation
Results in track 17 creating a directory:
~/bandcamper# cat "Ѕtratford Ct./Stratford Ct. | 1 yr Anniversary Compilation/17 - VANTAGE "/
cat: 'Ѕtratford Ct./Stratford Ct. | 1 yr Anniversary Compilation/17 - VANTAGE /': Is a directory
~/bandcamper# ls -la "Ѕtratford Ct./Stratford Ct. | 1 yr Anniversary Compilation/17 - VANTAGE "/
total 21880
drwxr-xr-x 2 root root 4096 Dec 8 09:17 .
drwxr-xr-x 3 root root 4096 Dec 8 09:17 ..
-rw-r--r-- 1 root root 22396201 Dec 8 09:17 ' - Get Ready.flac'
Seems like I missed a place where the slash needs to be replaced. I will probably look into this and submit a new pr during this weekend.
@UlyssesZh I had to revert the PR, sorry. Can you open it again?