X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aft.c;h=99b132dd9d249a9991805068161fc1faf729ada5;hp=209ea525be39309ea7ea5af0479289cdc01833c3;hb=55030e0d1a28ded2076d62fb9aac3539ff337275;hpb=bf04447eb634a2e9ac3e644e48386597fecca9ee diff --git a/aft.c b/aft.c index 209ea525..99b132dd 100644 --- a/aft.c +++ b/aft.c @@ -1401,6 +1401,7 @@ afhi <=> force or no HS #define ADD_FLAG_LAZY 1 #define ADD_FLAG_FORCE 2 #define ADD_FLAG_VERBOSE 4 +#define ADD_FLAG_ALL 8 /* TODO: change log messages so that they get written to the result buffer */ @@ -1564,6 +1565,9 @@ static int add_one_audio_file(const char *arg, const void *private_data) ret = verify_path(arg, &path); if (ret < 0) goto out_free; + ret = guess_audio_format(path); + if (ret < 0 && !(pad->flags & ADD_FLAG_ALL)) + goto out_free; query.data = path; query.size = strlen(path) + 1; ret = send_callback_request(path_brother_callback, &query, &result); @@ -1649,6 +1653,10 @@ int com_add(int fd, int argc, char * const * const argv) i++; break; } + if (!strcmp(arg, "-a")) { + pad.flags |= ADD_FLAG_ALL; + continue; + } if (!strcmp(arg, "-l")) { pad.flags |= ADD_FLAG_LAZY; continue;