Mapper: move map_song_detach() to db/DatabaseSong.cxx

Use Storage::MapUTF8() internally, don't use global variables.
This commit is contained in:
Max Kellermann
2014-02-07 00:29:07 +01:00
parent 19a982cf69
commit c13810ebaa
17 changed files with 97 additions and 55 deletions

View File

@@ -124,7 +124,8 @@ handle_searchaddpl(Client &client, int argc, char *argv[])
if (db == nullptr)
return print_error(client, error);
return search_add_to_playlist(*db, "", playlist, &filter, error)
return search_add_to_playlist(*db, *client.GetStorage(),
"", playlist, &filter, error)
? CommandResult::OK
: print_error(client, error);
}

View File

@@ -196,7 +196,8 @@ handle_playlistadd(Client &client, gcc_unused int argc, char *argv[])
if (db == nullptr)
return print_error(client, error);
success = search_add_to_playlist(*db, uri, playlist, nullptr,
success = search_add_to_playlist(*db, *client.GetStorage(),
uri, playlist, nullptr,
error);
#else
success = false;