mirror of
https://github.com/taglib/taglib.git
synced 2026-02-12 11:12:58 -05:00
Fix and simplify Matroska simple tag
Avoid use of raw pointers, fix property interface.
This commit is contained in:
@ -22,18 +22,13 @@ int main(int argc, char *argv[])
|
||||
auto tag = file.tag(true);
|
||||
tag->clearSimpleTags();
|
||||
|
||||
auto simpleTag = new TagLib::Matroska::SimpleTagString();
|
||||
simpleTag->setName("Test Name 1");
|
||||
simpleTag->setTargetTypeValue(TagLib::Matroska::SimpleTag::TargetTypeValue::Track);
|
||||
simpleTag->setValue("Test Value 1");
|
||||
simpleTag->setLanguage("en");
|
||||
tag->addSimpleTag(simpleTag);
|
||||
tag->addSimpleTag(TagLib::Matroska::SimpleTag(
|
||||
"Test Name 1", TagLib::String("Test Value 1"),
|
||||
TagLib::Matroska::SimpleTag::TargetTypeValue::Track, "en"));
|
||||
|
||||
simpleTag = new TagLib::Matroska::SimpleTagString();
|
||||
simpleTag->setName("Test Name 2");
|
||||
simpleTag->setTargetTypeValue(TagLib::Matroska::SimpleTag::TargetTypeValue::Album);
|
||||
simpleTag->setValue("Test Value 2");
|
||||
tag->addSimpleTag(simpleTag);
|
||||
tag->addSimpleTag(TagLib::Matroska::SimpleTag(
|
||||
"Test Name 2", TagLib::String("Test Value 2"),
|
||||
TagLib::Matroska::SimpleTag::TargetTypeValue::Album));
|
||||
tag->setTitle("Test title");
|
||||
tag->setArtist("Test artist");
|
||||
tag->setYear(1969);
|
||||
|
||||
Reference in New Issue
Block a user