mpd: fix fetching mtime in getDirectoryRecursive
getdirectoryrecursive was using mpd_recv_song after a listall including directories, changed to use mpd_recv_entity instead (else incorrect mtime reported)
This commit is contained in:
committed by
Andrzej Rybczak
parent
8913c77786
commit
67550d4607
@@ -718,8 +718,10 @@ void Connection::GetDirectoryRecursive(const std::string &directory, SongConsume
|
|||||||
{
|
{
|
||||||
prechecksNoCommandsList();
|
prechecksNoCommandsList();
|
||||||
mpd_send_list_all_meta(m_connection, directory.c_str());
|
mpd_send_list_all_meta(m_connection, directory.c_str());
|
||||||
while (mpd_song *s = mpd_recv_song(m_connection))
|
while (mpd_entity *e = mpd_recv_entity(m_connection)) {
|
||||||
f(Song(s));
|
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);
|
mpd_response_finish(m_connection);
|
||||||
checkErrors();
|
checkErrors();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user