glomatico / spotify-web-downloader

A Python CLI app for downloading songs/music videos/albums/playlists directly from Spotify.
378 stars 43 forks source link

“truncate” should apply to file names only, not folder names #44

Closed azumukupoe closed 2 months ago

azumukupoe commented 2 months ago

In the current implementation, when the “truncate” option is set to 40 and “template_folder_album” is configured as “{album_artist}/{album} ({release_year})”, album folders are named in the format ‘Album Title XXXXXXXXXXXXXXXXXXXXXXXXXXX (197’. This truncation applies to both file and folder names, which can lead to confusion.

A more logical approach would be to apply the “truncate” function solely to file names, which are more likely to exceed the length limit than album folder names. This modification would improve the readability and organization of the album folders. The length of the file name should be calculated from the full path of the file, and then truncated if necessary. This change would ensure that the truncation process does not inadvertently affect the structure and readability of the album folders.