summaryrefslogtreecommitdiff
path: root/src/SongUpdate.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/SongUpdate.cxx
parentde568c84c267f4b33afd6dac10b6de15a8a38a69 (diff)
SongUpdate: move tag_scan_fallback() to tag/Generic.cxx
Diffstat (limited to 'src/SongUpdate.cxx')
-rw-r--r--src/SongUpdate.cxx21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx
index ae152b8dc..5b1141a40 100644
--- a/src/SongUpdate.cxx
+++ b/src/SongUpdate.cxx
@@ -32,8 +32,7 @@
#include "tag/Tag.hxx"
#include "tag/TagBuilder.hxx"
#include "tag/TagHandler.hxx"
-#include "tag/TagId3.hxx"
-#include "tag/ApeTag.hxx"
+#include "tag/Generic.hxx"
#include "TagFile.hxx"
#include "TagStream.hxx"
@@ -73,17 +72,6 @@ Song::LoadFile(Storage &storage, const char *path_utf8, Directory &parent)
#endif
-/**
- * Attempts to load APE or ID3 tags from the specified file.
- */
-static bool
-tag_scan_fallback(Path path,
- const TagHandler *handler, void *handler_ctx)
-{
- return tag_ape_scan2(path, handler, handler_ctx) ||
- tag_id3_scan(path, handler, handler_ctx);
-}
-
#ifdef ENABLE_DATABASE
bool
@@ -112,8 +100,8 @@ Song::UpdateFile(Storage &storage)
return false;
if (tag_builder.IsEmpty())
- tag_scan_fallback(path_fs, &full_tag_handler,
- &tag_builder);
+ ScanGenericTags(path_fs, full_tag_handler,
+ &tag_builder);
}
mtime = info.mtime;
@@ -165,8 +153,7 @@ DetachedSong::LoadFile(Path path)
return false;
if (tag_builder.IsEmpty())
- tag_scan_fallback(path, &full_tag_handler,
- &tag_builder);
+ ScanGenericTags(path, full_tag_handler, &tag_builder);
mtime = fi.GetModificationTime();
tag_builder.Commit(tag);