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

remove [] from %aunique #2397

Closed
diomekes opened this issue Jan 18, 2017 · 4 comments · Fixed by #2399
Closed

remove [] from %aunique #2397

diomekes opened this issue Jan 18, 2017 · 4 comments · Fixed by #2399
Labels
feature features we would like to implement

Comments

@diomekes
Copy link

diomekes commented Jan 18, 2017

%aunique in a path will by default add [] around the disambiguator. If a disambiguator is found on one album but is empty on the other, then the album name will end with [].

There may be a reason to have the brackets as default, but it seems to me a better option for the user to set any characters wanted around the disambiguator string in the path format itself.

I can do a PR, but I figured it would be easier just to post here and discuss if necessary. Here's the line of code:

res = u' [{0}]'.format(disam_value)

@sampsyo
Copy link
Member

sampsyo commented Jan 18, 2017

Sounds reasonable! How would you propose to set up the option? As an additional argument to the %aunique function?

@sampsyo sampsyo added the feature features we would like to implement label Jan 18, 2017
@diomekes
Copy link
Author

I simply meant to remove the [] from the code, and then anyone can do, for example, this in the config:

$artist/$album[%aunique{}]/$track. $title or $artist/$album(%aunique{})...

Would that work?

@sampsyo
Copy link
Member

sampsyo commented Jan 18, 2017

Alas, not quite—the reason the brackets are hard-coded is so they don't show up if no disambiguation is necessary. Those examples would put empty () and [] pairs at the end of every album directory.

@diomekes
Copy link
Author

Of course, that's exactly what I wanted to avoid, and I made it worse!

I'll take a look and see about how to do this within the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants