summaryrefslogtreecommitdiff
path: root/src/directory.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-13 22:02:37 +0200
committerMax Kellermann <max@duempel.org>2011-09-13 22:02:37 +0200
commitc779e2674abbc3eed08e49296c188a9f9ed5270e (patch)
tree35a3a84bb32f595c7916eda865c38e0b27d38418 /src/directory.c
parenta94d4be466ea3a48389361b483f72df45834f7d2 (diff)
db_visitor: add method playlist()
Diffstat (limited to 'src/directory.c')
-rw-r--r--src/directory.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/directory.c b/src/directory.c
index e6ccc60b7..ebc4013eb 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -184,6 +184,14 @@ directory_walk(const struct directory *directory, bool recursive,
return false;
}
+ if (visitor->playlist != NULL) {
+ const struct playlist_vector *pv = &directory->playlists;
+ for (const struct playlist_metadata *i = pv->head;
+ i != NULL; i = i->next)
+ if (!visitor->playlist(i, ctx, error_r))
+ return false;
+ }
+
const struct dirvec *dv = &directory->children;
for (size_t i = 0; i < dv->nr; ++i) {
struct directory *child = dv->base[i];