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

MBS-13149 / MBS-13153 / MBS-13156 / MBS-13157: More guess case changes #2974

Merged
merged 4 commits into from
Jul 10, 2023

Conversation

reosarevok
Copy link
Member

Fix MBS-13153 and MBS-13157, implement MBS-13149 and MBS-13156

Problem

The words "remaster" ("remastered") and "refix" are pretty much always ETI and should be treated as such by guess case. Same for "re-edit", which we already try to cover, but buggily.
While looking into these I also noticed we don't use global regexes enough, causing issues if the same word appears twice (uncommon, but not impossible).

Solution

I added all of the new words to the list of words which are put into parens if seen at the end of the title, and lowercased if in parens.
I fixed the re-edit check and made it behave differently inside and outside parens.
I made the a cappella and OC ReMix checks global so that it checks more than once per title.

Testing

Added a basic test for each case.

This wanted to lowercase it inside parens but it does not seem
like it did the trick. Changed it a bit to work like a_cappella,
which does work (this also makes it consistent with "reedit")
Also doing the same for the equivalent "remastered"
We need to use /g here or it will only fix the first case per title
(see tests for somewhat contrived examples).
@reosarevok reosarevok added QoL Non-urgent quality of life improvements Bug Bugs that should be checked/fixed soonish labels Jul 3, 2023
@reosarevok
Copy link
Member Author

@brainzbot, retest this please

2 similar comments
@reosarevok
Copy link
Member Author

@brainzbot, retest this please

@reosarevok
Copy link
Member Author

@brainzbot, retest this please

@reosarevok reosarevok merged commit c723ff5 into metabrainz:master Jul 10, 2023
2 checks passed
@reosarevok reosarevok deleted the MBS-13153 branch July 10, 2023 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bugs that should be checked/fixed soonish QoL Non-urgent quality of life improvements
Projects
None yet
2 participants