playlist: check if files were actually added to playlist

This commit is contained in:
Andrzej Rybczak
2010-06-19 23:16:15 +02:00
parent 9c02bbf596
commit eb07c327d2

View File

@@ -491,7 +491,8 @@ bool Playlist::Add(const MPD::SongList &l, bool play, int position)
if (Mpd.AddSong(**j, position) < 0)
break;
}
Mpd.CommitCommandsList();
if (!Mpd.CommitCommandsList())
return false;
if (play && old_playlist_size < Items->Size())
Mpd.Play(old_playlist_size);