aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_vector.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-05-09 21:37:43 +0200
committerMax Kellermann <max@duempel.org>2011-05-09 21:37:43 +0200
commit4b4aa64261154bcb1e521b98629c0640d6b259f7 (patch)
treee901de6264797d243bc8d3352ab2f033ff45977f /src/playlist_vector.h
parent26735390fffaa467bf90041a5c380802602affb6 (diff)
downloadmpd-4b4aa64261154bcb1e521b98629c0640d6b259f7.tar.gz
mpd-4b4aa64261154bcb1e521b98629c0640d6b259f7.tar.xz
mpd-4b4aa64261154bcb1e521b98629c0640d6b259f7.zip
directory: allow directories with just playlists
Keep those when scanning for empty directories. The check in playlist_vector_is_empty() was missing.
Diffstat (limited to 'src/playlist_vector.h')
-rw-r--r--src/playlist_vector.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/playlist_vector.h b/src/playlist_vector.h
index 566de5f00..62861ae49 100644
--- a/src/playlist_vector.h
+++ b/src/playlist_vector.h
@@ -51,6 +51,12 @@ playlist_vector_init(struct playlist_vector *pv)
void
playlist_vector_deinit(struct playlist_vector *pv);
+static inline bool
+playlist_vector_is_empty(const struct playlist_vector *pv)
+{
+ return pv->head == NULL;
+}
+
struct playlist_metadata *
playlist_vector_find(struct playlist_vector *pv, const char *name);