aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-29 12:15:16 +0200
committerMax Kellermann <max@duempel.org>2008-09-29 12:15:16 +0200
commit52a0ea2dc54b98a36923dbe92671eec4c055b11f (patch)
tree7c5cee5f5c1a4b3cd387ce98588bb8b07933471f
parent88aaa6b759daf02706daddb7a7a7fde83f76c592 (diff)
downloadmpd-52a0ea2dc54b98a36923dbe92671eec4c055b11f.tar.gz
mpd-52a0ea2dc54b98a36923dbe92671eec4c055b11f.tar.xz
mpd-52a0ea2dc54b98a36923dbe92671eec4c055b11f.zip
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.
Diffstat (limited to '')
-rw-r--r--src/directory.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/directory.c b/src/directory.c
index 64d55e7ee..31b1e9a80 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -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;
}