com_add(): Add missing return statement.
authorAndre Noll <maan@systemlinux.org>
Sat, 15 Sep 2007 08:41:48 +0000 (10:41 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 15 Sep 2007 08:41:48 +0000 (10:41 +0200)
Duplicates were added twice in force mode.

aft.c

diff --git a/aft.c b/aft.c
index d88be97..4845a54 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -683,6 +683,7 @@ static int print_list_item(struct ls_data *d, struct ls_options *opts,
                        sprintf(score_buf, "%li ", d->score);
        }
 
+       PARA_NOTICE_LOG("id: %s, %d\n", d->path, afsi->audio_format_id);
        if (opts->mode == LS_MODE_LONG) {
                para_printf(b,
                        "%s"    /* score */
@@ -1340,9 +1341,7 @@ static int com_add_callback(const struct osl_object *query,
                        &objs[AFTCOL_CHUNKS]);
                if (ret < 0)
                        return ret;
-               ret = mood_update_audio_file(row, NULL);
-               if (ret < 0)
-                       return ret;
+               return mood_update_audio_file(row, NULL);
        }
        /* new entry, use default afsi */
        default_afsi.last_played = time(NULL) - 365 * 24 * 60 * 60;