diff options
author | Max Kellermann <max@duempel.org> | 2012-01-24 21:38:31 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-01-24 22:26:43 +0100 |
commit | 3c75963352734dc33a0d6c833e9d5e1493d0e0d9 (patch) | |
tree | 0908f617f5e6c415b5765bfc06fa2804d378dc67 /src/directory_save.c | |
parent | 5f9dd8287cf8f77824273a3ab4e87dc80abeb46f (diff) | |
download | mpd-3c75963352734dc33a0d6c833e9d5e1493d0e0d9.tar.gz mpd-3c75963352734dc33a0d6c833e9d5e1493d0e0d9.tar.xz mpd-3c75963352734dc33a0d6c833e9d5e1493d0e0d9.zip |
directory: add function directory_get_song(), ...
Wrap songvec_find() and other songvec methods.
Diffstat (limited to 'src/directory_save.c')
-rw-r--r-- | src/directory_save.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directory_save.c b/src/directory_save.c index 087c99fe4..087fab4c7 100644 --- a/src/directory_save.c +++ b/src/directory_save.c @@ -146,7 +146,7 @@ directory_load(FILE *fp, struct directory *directory, const char *name = line + sizeof(SONG_BEGIN) - 1; struct song *song; - if (songvec_find(&directory->songs, name) != NULL) { + if (directory_get_song(directory, name) != NULL) { g_set_error(error, directory_quark(), 0, "Duplicate song '%s'", name); return NULL; @@ -157,7 +157,7 @@ directory_load(FILE *fp, struct directory *directory, if (song == NULL) return false; - songvec_add(&directory->songs, song); + directory_add_song(directory, song); } else if (g_str_has_prefix(line, PLAYLIST_META_BEGIN)) { /* duplicate the name, because playlist_metadata_load() will overwrite the |