aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbUtils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbUtils.c')
-rw-r--r--src/dbUtils.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c
index ff5f1883e..a9d83eb41 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -82,7 +82,8 @@ static int searchInDirectory(Song * song, void *_data)
LocateTagItemArray *array = &data->array;
if (strstrSearchTags(song, array->numItems, array->items))
- song_print_info(song, fd);
+ if (song_print_info(song, fd) < 0)
+ return -1;
return 0;
}
@@ -124,7 +125,8 @@ static int findInDirectory(Song * song, void *_data)
LocateTagItemArray *array = &data->array;
if (tagItemsFoundAndMatches(song, array->numItems, array->items))
- song_print_info(song, fd);
+ if (song_print_info(song, fd) < 0)
+ return -1;
return 0;
}
@@ -217,13 +219,6 @@ int addAllInToStoredPlaylist(const char *name, const char *utf8file)
&data);
}
-static int directoryPrintSongInfo(Song * song, void *data)
-{
- song_print_info(song, (int)(size_t)data);
-
- return 0;
-}
-
static int sumSongTime(Song * song, void *data)
{
unsigned long *sum_time = (unsigned long *)data;
@@ -236,7 +231,7 @@ static int sumSongTime(Song * song, void *data)
int printInfoForAllIn(int fd, const char *name)
{
- return traverseAllIn(name, directoryPrintSongInfo,
+ return traverseAllIn(name, song_print_info_x,
printDirectoryInDirectory, (void*)(size_t)fd);
}