Commit 6bed6d3e authored by Urs Fleisch's avatar Urs Fleisch
Browse files

do not change track number if the difference is only having "track/total" or...

do not change track number if the difference is only having "track/total" or "track", do not change genre if the difference is only "(GenreNumber)" or "GenreText"
parent b5a4afb3
......@@ -629,7 +629,7 @@ static bool setYear(ID3_Tag* tag, int num)
static bool setTrackNum(ID3_Tag* tag, int num, int numTracks = -1)
{
bool changed = false;
if (num >= 0) {
if (num >= 0 && getTrackNum(tag) != num) {
QString str;
if (num != 0) {
str.setNum(num);
......@@ -1041,7 +1041,8 @@ void Mp3File::setGenreV2(const QString& str)
if (!str.isNull()) {
int num = Genres::getNumber(str);
if (num >= 0 && num != 0xff) {
if (setGenreNum(m_tagV2, num)) {
if (getGenreNum(m_tagV2) != num &&
setGenreNum(m_tagV2, num)) {
markTag2Changed(Frame::FT_Genre);
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment