X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=play.c;h=1c1d809a8cd292798fbb138dc677c6467293d39d;hp=4545502bcf86c9042bfbfee5535b4b6b0fecc682;hb=534a94f441767947874cb15d18211edf758e9277;hpb=e20b1c45fee6f658afea9a92e5a833a449b0e2ff diff --git a/play.c b/play.c index 4545502b..1c1d809a 100644 --- a/play.c +++ b/play.c @@ -7,7 +7,6 @@ /** \file play.c Paraslash's standalone player. */ #include -#include #include #include #include @@ -837,24 +836,16 @@ static int com_tasks(struct play_task *pt, int argc, __a_unused char **argv) return 0; } -static int com_ls(struct play_task *pt, int argc, char **argv) +static int com_ls(struct play_task *pt, + __a_unused struct lls_parse_result *lpr) { - int i, j, ret; + int i; - if (argc == 1) { - FOR_EACH_PLAYLIST_FILE(i) - list_file(pt, i); - return 0; - } - for (j = 1; j < argc; j++) { - FOR_EACH_PLAYLIST_FILE(i) { - ret = fnmatch(argv[j], conf.inputs[i], 0); - if (ret == 0) /* match */ - list_file(pt, i); - } - } + FOR_EACH_PLAYLIST_FILE(i) + list_file(pt, i); return 0; } +EXPORT_PLAY_CMD_HANDLER(ls); static int com_play(struct play_task *pt, int argc, char **argv) {