aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateSong.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-29 16:46:02 +0100
committerMax Kellermann <max@duempel.org>2013-12-29 16:46:02 +0100
commit5bb563e3bc72b7aaea4e2df3280f38085bb515ba (patch)
tree2052618d1b51651969fe715c20e2203f00a3b972 /src/UpdateSong.cxx
parent9be82891b01ba2190a97032a2f84b70151bc2358 (diff)
downloadmpd-5bb563e3bc72b7aaea4e2df3280f38085bb515ba.tar.gz
mpd-5bb563e3bc72b7aaea4e2df3280f38085bb515ba.tar.xz
mpd-5bb563e3bc72b7aaea4e2df3280f38085bb515ba.zip
UpdateContainer: pass suffix instead of DecoderPlugin
Instead of using the first DecoderPlugin that supports the suffix, use the first one that actually implements the "container_scan" method.
Diffstat (limited to 'src/UpdateSong.cxx')
-rw-r--r--src/UpdateSong.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/UpdateSong.cxx b/src/UpdateSong.cxx
index bbfde7f4d..4101d6231 100644
--- a/src/UpdateSong.cxx
+++ b/src/UpdateSong.cxx
@@ -35,7 +35,7 @@
static void
update_song_file2(Directory &directory,
const char *name, const struct stat *st,
- const DecoderPlugin &plugin)
+ const char *suffix)
{
db_lock();
Song *song = directory.FindSong(name);
@@ -56,7 +56,7 @@ update_song_file2(Directory &directory,
if (!(song != nullptr && st->st_mtime == song->mtime &&
!walk_discard) &&
- update_container_file(directory, name, st, plugin)) {
+ update_container_file(directory, name, st, suffix)) {
if (song != nullptr) {
db_lock();
delete_song(directory, song);
@@ -110,6 +110,6 @@ update_song_file(Directory &directory,
if (plugin == nullptr)
return false;
- update_song_file2(directory, name, st, *plugin);
+ update_song_file2(directory, name, st, suffix);
return true;
}