summaryrefslogtreecommitdiff
path: root/src/sel_items_adder.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2014-11-01 23:16:06 +0100
committerAndrzej Rybczak <electricityispower@gmail.com>2014-11-01 23:16:06 +0100
commit30d57afcace02b6347cd5e644bd0a987717237fc (patch)
tree93f01dca2b8d2d70357bac8c5e9d4a1f63bd42aa /src/sel_items_adder.cpp
parentfabd24c6a5135eb995f43c07352a444de6ab1a56 (diff)
playlist editor: hold MPD::PlaylistS instead of std::stringS
Diffstat (limited to 'src/sel_items_adder.cpp')
-rw-r--r--src/sel_items_adder.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sel_items_adder.cpp b/src/sel_items_adder.cpp
index db6d17df..0d398283 100644
--- a/src/sel_items_adder.cpp
+++ b/src/sel_items_adder.cpp
@@ -200,11 +200,12 @@ void SelectedItemsAdder::populatePlaylistSelector(BaseScreen *old_screen)
if (!in_local_browser)
{
size_t begin = m_playlist_selector.size();
- Mpd.GetPlaylists([this](std::string playlist) {
- m_playlist_selector.addItem(Entry(playlist,
- boost::bind(&Self::addToExistingPlaylist, this, playlist)
+ for (MPD::PlaylistIterator it = Mpd.GetPlaylists(), end; it != end; ++it)
+ {
+ m_playlist_selector.addItem(Entry(it->path(),
+ boost::bind(&Self::addToExistingPlaylist, this, it->path())
));
- });
+ };
std::sort(m_playlist_selector.beginV()+begin, m_playlist_selector.endV(),
LocaleBasedSorting(std::locale(), Config.ignore_leading_the));
if (begin < m_playlist_selector.size())