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);
47 fileInfo.parseContainerFormat(diag, progress);
48 fileInfo.parseTags(diag, progress);
49 fileInfo.parseAttachments(diag, progress);
50 fileInfo.parseChapters(diag, progress);
51 fileInfo.parseEverything(diag, progress);
57 auto tag = fileInfo.tags().at(0);
63 tag->setValue(KnownField::Album,
TagValue(
"some UTF-8 string", TagTextEncoding::Utf8, tag->proposedTextEncoding()));
66 if (
auto *
const container = fileInfo.container()) {
67 for (std::size_t i = 0, count = container->attachmentCount(); i != count; ++i) {
68 auto attachment = container->attachment(i);
69 if (attachment->mimeType() ==
"image/jpeg") {
70 attachment->setIgnored(
true);
74 auto attachment = container->createAttachment();
75 attachment->setName(
"The cover");
76 attachment->setFile(
"cover.jpg", diag, progress);
88 fileInfo.applyChanges(diag, progress);