PlaylistFile: use class SongLoader

This commit is contained in:
Max Kellermann
2014-02-03 23:30:34 +01:00
parent d533b59ee3
commit b9c248e7e7
4 changed files with 17 additions and 25 deletions

View File

@@ -188,13 +188,8 @@ handle_playlistadd(Client &client, gcc_unused int argc, char *argv[])
bool success;
Error error;
if (uri_has_scheme(uri)) {
if (!uri_supported_scheme(uri)) {
command_error(client, ACK_ERROR_NO_EXIST,
"unsupported URI scheme");
return CommandResult::ERROR;
}
success = spl_append_uri(playlist, uri, error);
const SongLoader loader(client);
success = spl_append_uri(playlist, loader, uri, error);
} else {
#ifdef ENABLE_DATABASE
success = search_add_to_playlist(uri, playlist, nullptr,