playlist editor: fix adding songs with fetch delay enabled
This commit is contained in:
1
NEWS
1
NEWS
@@ -4,6 +4,7 @@ ncmpcpp-0.6.1 (????-??-??)
|
|||||||
* Only ID3v2.4 tags are now saved to mp3 files.
|
* Only ID3v2.4 tags are now saved to mp3 files.
|
||||||
* Mouse scrolling with newer ncurses API now works properly.
|
* Mouse scrolling with newer ncurses API now works properly.
|
||||||
* Adding songs from an album in media library now works properly with fetch delay.
|
* Adding songs from an album in media library now works properly with fetch delay.
|
||||||
|
* Adding songs from a playlist in playlist editor now works properly with fetch delay.
|
||||||
|
|
||||||
ncmpcpp-0.6 (2014-10-25)
|
ncmpcpp-0.6 (2014-10-25)
|
||||||
|
|
||||||
|
|||||||
@@ -239,14 +239,11 @@ ProxySongList PlaylistEditor::contentProxyList()
|
|||||||
|
|
||||||
void PlaylistEditor::AddToPlaylist(bool add_n_play)
|
void PlaylistEditor::AddToPlaylist(bool add_n_play)
|
||||||
{
|
{
|
||||||
MPD::SongList list;
|
|
||||||
|
|
||||||
if (isActiveWindow(Playlists) && !Playlists.empty())
|
if (isActiveWindow(Playlists) && !Playlists.empty())
|
||||||
{
|
{
|
||||||
bool success;
|
MPD::SongList list;
|
||||||
withUnfilteredMenu(Content, [&]() {
|
Mpd.GetPlaylistContent(Playlists.current().value(), vectorMoveInserter(list));
|
||||||
success = addSongsToPlaylist(Content.beginV(), Content.endV(), add_n_play, -1);
|
bool success = addSongsToPlaylist(list.begin(), list.end(), add_n_play, -1);
|
||||||
});
|
|
||||||
Statusbar::printf("Playlist \"%1%\" loaded%2%",
|
Statusbar::printf("Playlist \"%1%\" loaded%2%",
|
||||||
Playlists.current().value(), withErrors(success)
|
Playlists.current().value(), withErrors(success)
|
||||||
);
|
);
|
||||||
@@ -488,12 +485,8 @@ MPD::SongList PlaylistEditor::getSelectedSongs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if no item is selected, add songs from right column
|
// if no item is selected, add songs from right column
|
||||||
if (!any_selected && !Content.empty())
|
if (!any_selected && !Playlists.empty())
|
||||||
{
|
Mpd.GetPlaylistContent(Playlists.current().value(), vectorMoveInserter(result));
|
||||||
withUnfilteredMenu(Content, [this, &result]() {
|
|
||||||
result.insert(result.end(), Content.beginV(), Content.endV());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (isActiveWindow(Content))
|
else if (isActiveWindow(Content))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user