[description]
Negative values mean to jump backwards the given amount of seconds.
[/description]
+
+[subcommand ls]
+ purpose = list the playlist
+ [description]
+ This prints all paths of the playlist. The currently
+ active file is marked with an asterisk.
+ [/description]
/** \file play.c Paraslash's standalone player. */
#include <regex.h>
-#include <fnmatch.h>
#include <signal.h>
#include <inttypes.h>
#include <lopsub.h>
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)
{
SF: play.c
SN: list of commands
---
-N: ls
-D: List playlist.
-U: ls
-H: This prints all paths of the playlist. The currently active file is
-H: marked with an asterisk.
----
N: info
D: Print information about the current file.
U: info