Commit a16a52f3 authored by Michael Pyne's avatar Michael Pyne
Browse files

Fix handling of empty tags in the file renamer, that have prefix/suffix values.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=935735
parent 27e2d387
...@@ -25,8 +25,20 @@ QString CategoryReaderInterface::value(const CategoryID &category) const ...@@ -25,8 +25,20 @@ QString CategoryReaderInterface::value(const CategoryID &category) const
if(category.category == Track) if(category.category == Track)
value = fixupTrack(value, category.categoryNumber).trimmed(); value = fixupTrack(value, category.categoryNumber).trimmed();
if(value.isEmpty() && emptyAction(category) == TagRenamerOptions::UseReplacementValue) if(value.isEmpty()) {
value = emptyText(category); switch(emptyAction(category)) {
case TagRenamerOptions::UseReplacementValue:
value = emptyText(category);
break;
case TagRenamerOptions::IgnoreEmptyTag:
return QString();
default:
// No extra action needed.
break;
}
}
return prefix(category) + value + suffix(category); return prefix(category) + value + suffix(category);
} }
......
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