summaryrefslogtreecommitdiff
path: root/tag.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tag.cpp')
-rw-r--r--tag.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tag.cpp b/tag.cpp
index 833735a..f65470f 100644
--- a/tag.cpp
+++ b/tag.cpp
@@ -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);