w->image_id_width, afsi->image_id,
w->lyrics_id_width, afsi->lyrics_id,
w->bitrate_width, afhi->bitrate,
- audio_format_name(afsi->audio_format_id), /* FIXME */
+ audio_format_name(afsi->audio_format_id),
w->frequency_width, afhi->frequency,
afhi->channels,
duration_buf,
image_line,
lyrics_line,
afhi->bitrate,
- "mp3", /* FIXME */
+ audio_format_name(afsi->audio_format_id),
afhi->frequency,
afhi->channels,
duration_buf,
#define ADD_FLAG_FORCE 2
#define ADD_FLAG_VERBOSE 4
+/* TODO: change log messages so that they get written to the result buffer */
+
static int com_add_callback(const struct osl_object *query,
__a_unused struct osl_object *result)
{
ret = 1;
if (pb && (pad->flags & ADD_FLAG_LAZY)) { /* lazy is really cheap */
if (pad->flags & ADD_FLAG_VERBOSE)
- PARA_NOTICE_LOG("lazy-ignore: %s\n", path);
+ ret = send_va_buffer(pad->fd, "lazy-ignore: %s\n", path);
goto out_free;
}
/* We still want to add this file. Compute its hash. */
ret = 1;
if (pb && hs && hs == pb && (!(pad->flags & ADD_FLAG_FORCE))) {
if (pad->flags & ADD_FLAG_VERBOSE)
- PARA_NOTICE_LOG("not forcing update: %s\n", path);
+ ret = send_va_buffer(pad->fd,
+ "not forcing update: %s\n", path);
goto out_unmap;
}
/*
if (!hs || (pad->flags & ADD_FLAG_FORCE)) {
ret = compute_afhi(path, map.data, map.size, &afhi);
if (ret < 0) {
- PARA_WARNING_LOG("audio format of %s not recognized, skipping\n", path);
- ret = 1;
+ ret = send_va_buffer(pad->fd,
+ "audio format of %s not recognized\n", path);
goto out_unmap;
}
format_num = ret;