Skip to content

Disambiguate on release#153

Merged
JoeLametta merged 11 commits into
whipper-team:masterfrom
Freso:issue-127-always-disambiguate-on-release
Jun 5, 2017
Merged

Disambiguate on release#153
JoeLametta merged 11 commits into
whipper-team:masterfrom
Freso:issue-127-always-disambiguate-on-release

Conversation

@Freso
Copy link
Copy Markdown
Member

@Freso Freso commented Apr 29, 2017

Right now the disambiguation algorithm will just disambiguate on the first part of the template string, regardless of what actually is in the template. This leads to unexpected results like #127.

This PR fixes #127 but also otherwise make the disambiguation a bit more robust. See the details in the added tests and commit messages.

@Freso Freso changed the title Disambiguate on release (WIP) Disambiguate on release Apr 29, 2017
@Freso
Copy link
Copy Markdown
Member Author

Freso commented May 31, 2017

@lschapker Can you try this code out and see if it works for your use case?

Freso added 10 commits May 31, 2017 23:31
Some of these might not occur in the wild, but we theoretically support
them at least, and making sure they work might catch other issues we
didn't think of yet.
os.path.split() only even splits into two components, which means that
path templates that have more than two parts (e.g., `%A/%d - %y/%X`)
will not get split properly for the purpose of added disambiguation
parts to them.

os.path.join() will still work fine to splice the split template back
together as it takes an arbitrary number of arguments.
Instead of iterating over all the path parts and added disambiguation to
each, it now only adds the disambiguation to the first match.
@Freso
Copy link
Copy Markdown
Member Author

Freso commented May 31, 2017

(Rebased unto latest master to 1) resolve a conflict in a file, and 2) to run flake8 tests on the PR.)

@JoeLametta
Copy link
Copy Markdown
Collaborator

@lschapker Can you try this code out and see if it works for your use case?

LGTM. 👍
I'll keep waiting till monday then, if there isn't any news, I'll merge the PR.

Thanks,
Joe

@JoeLametta JoeLametta merged commit fe4cf1a into whipper-team:master Jun 5, 2017
@JoeLametta
Copy link
Copy Markdown
Collaborator

Merged, thanks.

@Freso Freso deleted the issue-127-always-disambiguate-on-release branch June 5, 2017 20:25
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.

"Catalog Number" incorrectly appended to "artist" instead of the Album name.

2 participants