Skip to content

Commit ec98bf6

Browse files
author
dogatech
committed
remove (original mix) from song titles
1 parent aa17138 commit ec98bf6

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

be/src/MusicManager.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ void removeFeaturingFromAlbumArtist(Song* updatedSong) {
117117
}
118118
}
119119

120+
void removeOriginalMix(Song* updatedSong) {
121+
boost::regex originalMixRegex(" [(][Oo]riginal [Mm]ix[)]");
122+
boost::smatch origMixMatch;
123+
if (boost::regex_search(updatedSong->getTitle(), origMixMatch, originalMixRegex, boost::match_extra)) {
124+
updatedSong->setTitle(boost::regex_replace(updatedSong->getTitle(), originalMixRegex, ""));
125+
}
126+
}
127+
120128
void copyRemixer(Song* updatedSong) {
121129
boost::regex rmxrRegex(REMIX_REGEX);
122130
boost::smatch rmxrMatch;
@@ -392,7 +400,8 @@ void MusicManager::writeTagsToSong(Song* song) {
392400
updatedSong->setArtist(artists[0]);
393401
}
394402

395-
// copy remixer
403+
// handle remix in song title
404+
removeOriginalMix(updatedSong);
396405
copyRemixer(updatedSong);
397406

398407
// add an album artist if one does not exist & not a compilation

fe/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "SoulSifter",
33
"version": "1.5.1",
44
"description": "DJ & music organization app.",
5-
"build": 2995,
5+
"build": 2998,
66
"main": "main.js",
77
"scripts": {
88
"fe:build": "vite build",

0 commit comments

Comments
 (0)