Improve album and title disc, remastered, etc matching
Don't partial remove things like "(Mono / Remastered)". Fixes #1387
This commit is contained in:
@@ -123,9 +123,10 @@ class Song {
|
||||
static const QString kFtsBindSpec;
|
||||
static const QString kFtsUpdateSpec;
|
||||
|
||||
static const QRegularExpression kAlbumRemoveDisc;
|
||||
static const QRegularExpression kAlbumRemoveMisc;
|
||||
static const QRegularExpression kTitleRemoveMisc;
|
||||
using RegularExpressionList = QList<QRegularExpression>;
|
||||
static const RegularExpressionList kAlbumDisc;
|
||||
static const RegularExpressionList kAlbumMisc;
|
||||
static const RegularExpressionList kTitleMisc;
|
||||
|
||||
static const QStringList kArticles;
|
||||
|
||||
@@ -443,6 +444,14 @@ class Song {
|
||||
// It is more efficient to use IsOnSameAlbum, but this function can be used when you need to hash the key to do fast lookups.
|
||||
QString AlbumKey() const;
|
||||
|
||||
static bool ContainsRegexList(const QString &str, const RegularExpressionList ®ex_list);
|
||||
static QString StripRegexList(QString str, const RegularExpressionList ®ex_list);
|
||||
static bool AlbumContainsDisc(const QString &album);
|
||||
static QString AlbumRemoveDisc(const QString &album);
|
||||
static QString AlbumRemoveMisc(const QString &album);
|
||||
static QString AlbumRemoveDiscMisc(const QString &album);
|
||||
static QString TitleRemoveMisc(const QString &title);
|
||||
|
||||
private:
|
||||
struct Private;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user