summaryrefslogtreecommitdiff
path: root/src/tag/Generic.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-02-22 18:00:49 +0100
committerMax Kellermann <max@duempel.org>2016-02-22 18:00:49 +0100
commit7623c1c5cba95f24f2fb530d9796eceb9a95b710 (patch)
treee66472158e5740fa2868f2c59aa6c818a32f1110 /src/tag/Generic.cxx
parentde568c84c267f4b33afd6dac10b6de15a8a38a69 (diff)
SongUpdate: move tag_scan_fallback() to tag/Generic.cxx
Diffstat (limited to 'src/tag/Generic.cxx')
-rw-r--r--src/tag/Generic.cxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/tag/Generic.cxx b/src/tag/Generic.cxx
new file mode 100644
index 000000000..0c2ce46f0
--- /dev/null
+++ b/src/tag/Generic.cxx
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+#include "Generic.hxx"
+#include "TagId3.hxx"
+#include "ApeTag.hxx"
+#include "fs/Path.hxx"
+
+/**
+ * Attempts to scan APE or ID3 tags from the specified file.
+ */
+bool
+ScanGenericTags(Path path, const TagHandler &handler, void *ctx)
+{
+ return tag_ape_scan2(path, &handler, ctx) ||
+ tag_id3_scan(path, &handler, ctx);
+}