14 using namespace std::literals;
27 std::clog <<
"At step: " << feedback.
step() <<
'\n';
31 std::clog <<
"Step percentage: " << feedback.
stepPercentage() <<
'\n';
35 fileInfo.setPath(
"/path/to/some/file"sv);
46 fileInfo.parseContainerFormat(diag, progress);
47 fileInfo.parseTags(diag, progress);
48 fileInfo.parseAttachments(diag, progress);
49 fileInfo.parseChapters(diag, progress);
50 fileInfo.parseEverything(diag, progress);
56 auto tag = fileInfo.tags().at(0);
62 tag->setValue(KnownField::Album,
TagValue(
"some UTF-8 string", TagTextEncoding::Utf8, tag->proposedTextEncoding()));
65 if (
auto *
const container = fileInfo.container()) {
66 for (std::size_t i = 0, count = container->attachmentCount(); i != count; ++i) {
67 auto attachment = container->attachment(i);
68 if (attachment->mimeType() ==
"image/jpeg") {
69 attachment->setIgnored(
true);
73 auto attachment = container->createAttachment();
74 attachment->setName(
"The cover");
75 attachment->setFile(
"cover.jpg", diag, progress);
87 fileInfo.parseEverything(diag, progress);
88 fileInfo.applyChanges(diag, progress);