diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2012-08-14 17:15:18 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2012-08-14 17:15:18 +0200 |
commit | dad2bba13e32fd9b916a6f09655844b553713a7d (patch) | |
tree | 0820f5f592f89740d91cc34c4e15a4ab308ffec2 /src/mpdpp.cpp | |
parent | bab756c57952238bfcd306f1e3a6e6f42f4338c6 (diff) |
optimize a bit adding playlists/directories to playlist
Diffstat (limited to 'src/mpdpp.cpp')
-rw-r--r-- | src/mpdpp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mpdpp.cpp b/src/mpdpp.cpp index 285d0573..1b042960 100644 --- a/src/mpdpp.cpp +++ b/src/mpdpp.cpp @@ -883,19 +883,19 @@ int MPD::Connection::AddSong(const Song &s, int pos) return !s.Empty() ? (AddSong((!s.isFromDB() ? "file://" : "") + (s.Localized() ? locale_to_utf_cpy(s.GetFile()) : s.GetFile()), pos)) : -1; } -void MPD::Connection::Add(const std::string &path) +bool MPD::Connection::Add(const std::string &path) { if (!itsConnection) - return; + return false; if (!isCommandsListEnabled) { GoBusy(); - mpd_run_add(itsConnection, path.c_str()); + return mpd_run_add(itsConnection, path.c_str()); } else { assert(!isIdle); - mpd_send_add(itsConnection, path.c_str()); + return mpd_send_add(itsConnection, path.c_str()); } } |