tag editor: improve tag writing abilities

This commit is contained in:
Andrzej Rybczak
2012-09-12 23:31:53 +02:00
parent d55070754d
commit 4c33af47da
2 changed files with 83 additions and 66 deletions

View File

@@ -169,8 +169,11 @@ void MutableSong::setDuration(unsigned int duration)
void MutableSong::setTags(SetFunction set, const std::string &value, const std::string &delimiter)
{
auto tags = split(value, delimiter);
for (size_t i = 0; i < tags.size(); ++i)
size_t i = 0;
for (; i < tags.size(); ++i)
(this->*set)(tags[i], i);
// set next tag to be empty, so tags with bigger indexes won't be read
(this->*set)("", i);
}
bool MutableSong::isModified() const