diff --git a/src/mpdpp.cpp b/src/mpdpp.cpp index 671263c5..bb3dcfd6 100644 --- a/src/mpdpp.cpp +++ b/src/mpdpp.cpp @@ -718,8 +718,10 @@ void Connection::GetDirectoryRecursive(const std::string &directory, SongConsume { prechecksNoCommandsList(); mpd_send_list_all_meta(m_connection, directory.c_str()); - while (mpd_song *s = mpd_recv_song(m_connection)) - f(Song(s)); + while (mpd_entity *e = mpd_recv_entity(m_connection)) { + if (mpd_entity_get_type(e) == MPD_ENTITY_TYPE_SONG) + f(Song(mpd_song_dup(mpd_entity_get_song(e)))); + } mpd_response_finish(m_connection); checkErrors(); }