diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-12 03:35:45 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-12 05:27:34 -0700 |
commit | bb106c3bf8daf366a4b4ca7229010c038f89755c (patch) | |
tree | 2db77aeed63d095a5533fb6f5d175af4cb10dade /src/directory.c | |
parent | d60f11020f4901b806c822ef5ab2d87bbb9e4077 (diff) | |
download | mpd-bb106c3bf8daf366a4b4ca7229010c038f89755c.tar.gz mpd-bb106c3bf8daf366a4b4ca7229010c038f89755c.tar.xz mpd-bb106c3bf8daf366a4b4ca7229010c038f89755c.zip |
directory: always maintain sorted properties vectors
This allows clients to see sorted results while we're
updating the DB and removes the need for us to have
to sort manually.
We'll have to write separate routines for managing stored
playlists with songvecs eventually; but that's for another day.
Diffstat (limited to '')
-rw-r--r-- | src/directory.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/directory.c b/src/directory.c index 709353476..3ebac6830 100644 --- a/src/directory.c +++ b/src/directory.c @@ -110,19 +110,6 @@ directory_get_subdir(struct directory *dir, const char *name) return found; } -static int directory_sort_x(struct directory *dir, mpd_unused void *arg) -{ - directory_sort(dir); - return 0; -} - -void directory_sort(struct directory *dir) -{ - dirvec_sort(&dir->children); - dirvec_for_each(&dir->children, directory_sort_x, NULL); - songvec_sort(&dir->songs); -} - struct dirwalk_arg { int (*each_song) (struct mpd_song *, void *); int (*each_dir) (struct directory *, void *); |