diff options
Diffstat (limited to 'tag.cpp')
-rw-r--r-- | tag.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -5,6 +5,15 @@ #include <cstdlib> #include <stdexcept> +// TODO: Make this a "smart" tag loader +Tag::p Tag::load(const std::string filename) { + return Tag::p(new ID3Tag(filename)); +} + +bool Tag::has_field(const std::string name) { + return fields.find(name) != fields.end(); +} + void ID3Tag::tag_add_string(struct id3_tag *id3tag, const char *type, const char *id) { struct id3_frame *frame = id3_tag_findframe(id3tag, id, 0); |