diff options
Diffstat (limited to 'src/UpdateSong.cxx')
-rw-r--r-- | src/UpdateSong.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/UpdateSong.cxx b/src/UpdateSong.cxx index bfab5c4a0..592298f49 100644 --- a/src/UpdateSong.cxx +++ b/src/UpdateSong.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -27,7 +27,6 @@ #include "DatabaseLock.hxx" #include "Directory.hxx" #include "Song.hxx" -#include "DecoderPlugin.hxx" #include "DecoderList.hxx" #include "Log.hxx" @@ -36,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); @@ -57,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); @@ -70,7 +69,7 @@ update_song_file2(Directory &directory, if (song == nullptr) { FormatDebug(update_domain, "reading %s/%s", directory.GetPath(), name); - song = Song::LoadFile(name, &directory); + song = Song::LoadFile(name, directory); if (song == nullptr) { FormatDebug(update_domain, "ignoring unrecognized file %s/%s", @@ -106,11 +105,9 @@ update_song_file(Directory &directory, const char *name, const char *suffix, const struct stat *st) { - const struct DecoderPlugin *plugin = - decoder_plugin_from_suffix(suffix, nullptr); - if (plugin == nullptr) + if (!decoder_plugins_supports_suffix(suffix)) return false; - update_song_file2(directory, name, st, *plugin); + update_song_file2(directory, name, st, suffix); return true; } |