Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
Repeated labels and cat#s are not written to the tags (closes #41)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dremora committed Oct 28, 2012
1 parent 8154c9a commit ca2afd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FileTagMap.cpp
Expand Up @@ -106,13 +106,14 @@ void Tag::write_label_info(const Release &release) {

TagValues labels, catalog_numbers;
for (auto i = 0; i < release.label_info_count(); i++) {
// TODO: possibly remove duplicates?
if (auto label = release.get_label_info(i)->get_name()) {
labels.add_item(label);
}
labels.remove_duplicates_t(strcmp);
if (auto catalog_number = release.get_label_info(i)->get_catalog_number()) {
catalog_numbers.add_item(catalog_number);
}
catalog_numbers.remove_duplicates_t(strcmp);
}
set("LABEL", labels);
set("CATALOGNUMBER", catalog_numbers);
Expand Down

1 comment on commit ca2afd2

@jesus2099
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, haha :)
Thanks.

Please sign in to comment.