Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update album.py to accept subfolders in config variable folder_format #732

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

cloud74pebble
Copy link
Contributor

Correct handling of subfolders in config variable "folder_format"

e.g.:
[filepaths]
folder_format = "{albumartist}/{title} ({year})"

old method didn't allow creating subfolders by stripping "" or "/"

Correct handling of subfolders in config variable "folder_format"

e.g.:
[filepaths]
folder_format = "{albumartist}/{title} ({year})"

old method didn't allow creating subfolders by stripping "\" or "/"
@nathom
Copy link
Owner

nathom commented Sep 1, 2024

I think this might cause unexpected behavior if there is a / in any metadata.

@cloud74pebble
Copy link
Contributor Author

It doesn't affect any metadata.
It is just the storage-path in the filesystem.

with last release it was possible to sort the output to folders:
e.g. Albumartist/Albumtitle
or Albumartist/Year/Albumtitle

Using the current dev-branch it wasn't possible anymore.
This small patch fixed it.

@Delivator
Copy link

Bump

@nzoschke
Copy link

This works for me too

@nzoschke
Copy link

I think this might cause unexpected behavior if there is a / in any metadata.

This looks to be handled properly.

Metadata albumartist, albumcomposer, title all pass through clean_filename before being passed as the format kwargs. So if that metadata has / it is stripped then used as subpaths for the folder_format when it contains /.

@nathom nathom merged commit 37be6e8 into nathom:dev Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants