diff options
author | Bert Wesarg <Bert.Wesarg@googlemail.com> | 2018-10-27 02:21:18 +0200 |
---|---|---|
committer | Stephen F. Booth <me@sbooth.org> | 2018-10-26 19:21:18 -0500 |
commit | c2f544c9d1d87a7bfe827e05f8da5c4a48b1a8d9 (patch) | |
tree | 49a4aca83d57587e0e17f844f0226281b4f43d09 | |
parent | 8ca75f03b5e9a19282ea01a0a5590bd345f2f92e (diff) |
Fill `TableOfContentsFrame::toString()`. (#852)
-rw-r--r-- | taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp b/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp index ddd3b88c..efe89d17 100644 --- a/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp +++ b/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp @@ -216,7 +216,23 @@ void TableOfContentsFrame::removeEmbeddedFrames(const ByteVector &id) String TableOfContentsFrame::toString() const { - return String(); + String s = String(d->elementID) + + ": top level: " + (d->isTopLevel ? "true" : "false") + + ", ordered: " + (d->isOrdered ? "true" : "false"); + + if(!d->childElements.isEmpty()) { + s+= ", chapters: [ " + String(d->childElements.toByteVector(", ")) + " ]"; + } + + if(!d->embeddedFrameList.isEmpty()) { + StringList frameIDs; + for(FrameList::ConstIterator it = d->embeddedFrameList.begin(); + it != d->embeddedFrameList.end(); ++it) + frameIDs.append((*it)->frameID()); + s += ", sub-frames: [ " + frameIDs.toString(", ") + " ]"; + } + + return s; } PropertyMap TableOfContentsFrame::asProperties() const |