Commit 52a0ea2d authored by Eric Wong's avatar Eric Wong Committed by Max Kellermann

directory: update playlist version if updated

If we updated the mpd metadata database; then there's a chance some of those songs in the playlist will have updated metadata. So be on the safe side and increment the playlist version number if _any_ song changed (this is how all released versions of mpd did it, too). This bug was introduced recently when making "update" threaded. Thanks to stonecrest for the bug report.
parent 88aaa6b7
......@@ -123,9 +123,14 @@ int isUpdatingDB(void)
void reap_update_task(void)
{
enum update_return ret;
if (progress != UPDATE_PROGRESS_DONE)
return;
pthread_join(update_thr, NULL);
if (pthread_join(update_thr, (void **)&ret))
FATAL("error joining update thread: %s\n", strerror(errno));
if (ret == UPDATE_RETURN_UPDATED)
playlistVersionChange();
progress = UPDATE_PROGRESS_IDLE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment