diff options
author | Arno <arno@disconnect.de> | 2018-02-17 17:46:11 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-02-17 17:46:11 +0100 |
commit | e517fc534681590ea72b1eac1b5b12d36d7e502d (patch) | |
tree | f8820b03b24688d2958bf0b28724460d61318132 /indexerwidget.cpp | |
parent | 98bc2dd70847735d852b644da3fa5cc0f1fd1623 (diff) | |
download | BeetPlayer-e517fc534681590ea72b1eac1b5b12d36d7e502d.tar.gz BeetPlayer-e517fc534681590ea72b1eac1b5b12d36d7e502d.tar.bz2 BeetPlayer-e517fc534681590ea72b1eac1b5b12d36d7e502d.zip |
Don't consider "<artist> feat. <anotherartist>" different
Check if the artist's name contains " feat." If so, cut it off right
there to not clutter the artist's view with "bla feat. blub" and just
one song. It's a simple string compare, relying on beet and Musicbrainz
doing the right thing (tm) :)
Diffstat (limited to 'indexerwidget.cpp')
-rw-r--r-- | indexerwidget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indexerwidget.cpp b/indexerwidget.cpp index b5087cc..da9c32f 100644 --- a/indexerwidget.cpp +++ b/indexerwidget.cpp @@ -146,6 +146,10 @@ void BeetReader::run(){ continue; } QString artist = toQString(file.tag()->artist()); + int featIdx = artist.indexOf(" feat."); + if(featIdx > -1){ + artist = artist.left(featIdx); + } QString album = toQString(file.tag()->album()); QString title = toQString(file.tag()->title()); QString genre = toQString(file.tag()->genre()); |