aboutsummaryrefslogtreecommitdiff
path: root/src/directory_save.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-01-24 21:38:31 +0100
committerMax Kellermann <max@duempel.org>2012-01-24 22:26:43 +0100
commit3c75963352734dc33a0d6c833e9d5e1493d0e0d9 (patch)
tree0908f617f5e6c415b5765bfc06fa2804d378dc67 /src/directory_save.c
parent5f9dd8287cf8f77824273a3ab4e87dc80abeb46f (diff)
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directory_save.c b/src/directory_save.c
index 087c99fe..087fab4c 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