get rid of Playlist::PlayNewlyAddedSongs / correct adding songs in Media Library

This commit is contained in:
Andrzej Rybczak
2013-05-17 16:55:50 +02:00
parent 2f9ab8f267
commit 7deeecee20
10 changed files with 85 additions and 70 deletions

View File

@@ -126,9 +126,10 @@ void Browser::enterPressed()
}
case itPlaylist:
{
Mpd.LoadPlaylist(item.name);
MPD::SongList list;
Mpd.GetPlaylistContentNoInfo(item.name, vectorMoveInserter(list));
addSongsToPlaylist(list.begin(), list.end(), true, -1);
Statusbar::msg("Playlist \"%s\" loaded", item.name.c_str());
myPlaylist->PlayNewlyAddedSongs();
}
}
}
@@ -166,7 +167,7 @@ void Browser::spacePressed()
list.reserve(items.size());
for (MPD::ItemList::const_iterator it = items.begin(); it != items.end(); ++it)
list.push_back(*it->song);
addSongsToPlaylist(list, false, -1);
addSongsToPlaylist(list.begin(), list.end(), false, -1);
}
else
# endif // !WIN32