Improve parsing of artist/title from file names (+ tests)#2304
Merged
daschuer merged 4 commits intomixxxdj:masterfrom Sep 29, 2019
uklotzde:parse_artist_title
Merged
Improve parsing of artist/title from file names (+ tests)#2304daschuer merged 4 commits intomixxxdj:masterfrom uklotzde:parse_artist_title
daschuer merged 4 commits intomixxxdj:masterfrom
uklotzde:parse_artist_title
Conversation
- at least the title must be empty - splitting into artist/title only if both fields are empty
daschuer
reviewed
Sep 28, 2019
|
|
||
| namespace { | ||
|
|
||
| const QString kArtistTitleSeparator = "_-_"; |
Member
There was a problem hiding this comment.
Can we define " - " as well? This will avoid the assumption that only "_-_" is supported.
Contributor
Author
|
The discussion shows that this simplistic feature should have never been added. I had the pleasure to keep it alive during all the metadata rework and now once again. It solves a single, isolated use case and causes confusion for everybody else with a slightly different use case. I'm still convinced that simply using the file name (without the file extension that already becomes the file type) as the title would be the way to go, transparent and straight-forward. |
Member
|
Thank you. LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "smart" parsing of artist and title from file names should only be triggered for tracks without a title. Splitting into artist and title should only be applied if both artist and title are empty to avoid inconsistencies.
TrackInfoand add extensive tests that verify the intended behaviorPersonally, I'm not a fan of this pseudo-smart parsing function and would simply copy the file name (without extension) into empty title fields, i.e. by setting
splitArtistTitle = falseindependent of the artist field. But removing this function entirely might surprise some users, so let's keep and improve it slightly.Some of the complaints (that this PR still won't fix as requested): https://www.mixxx.org/forums/viewtopic.php?f=3&t=12838