Revert "command: new commands "findin", "searchin" with base URI"

This reverts commit a577944ab5.

Will be replaced by new options for the old commands "search" and
"find".
This commit is contained in:
Max Kellermann 2013-10-29 19:29:22 +01:00
parent 44581dbef5
commit b5fc21b9f4
5 changed files with 4 additions and 60 deletions

1
NEWS
View File

@ -6,7 +6,6 @@ ver 0.18 (2012/??/??)
- new command "readcomments" lists arbitrary file tags
- new command "toggleoutput"
- "find"/"search" with "any" does not match file name
- new commands "findin", "searchin" with base URI
- search for album artist falls back to the artist tag
- re-add the "volume" command
* input:

View File

@ -1491,23 +1491,6 @@ OK
</para>
</listitem>
</varlistentry>
<varlistentry id="command_findin">
<term>
<cmdsynopsis>
<command>findin</command>
<arg choice="req"><replaceable>URI</replaceable></arg>
<arg choice="req"><replaceable>TYPE</replaceable></arg>
<arg choice="req"><replaceable>WHAT</replaceable></arg>
<arg choice="opt"><replaceable>...</replaceable></arg>
</cmdsynopsis>
</term>
<listitem>
<para>
Like <command>find</command>, but allows specifying a
base URI for the find.
</para>
</listitem>
</varlistentry>
<varlistentry id="command_findadd">
<term>
<cmdsynopsis>
@ -1643,23 +1626,6 @@ OK
</para>
</listitem>
</varlistentry>
<varlistentry id="command_searchin">
<term>
<cmdsynopsis>
<command>searchin</command>
<arg choice="req"><replaceable>URI</replaceable></arg>
<arg choice="req"><replaceable>TYPE</replaceable></arg>
<arg choice="req"><replaceable>WHAT</replaceable></arg>
<arg choice="opt"><replaceable>...</replaceable></arg>
</cmdsynopsis>
</term>
<listitem>
<para>
Like <command>search</command>, but allows specifying a
base URI for the search.
</para>
</listitem>
</varlistentry>
<varlistentry id="command_searchadd">
<term>
<cmdsynopsis>

View File

@ -91,7 +91,6 @@ static const struct command commands[] = {
{ "enableoutput", PERMISSION_ADMIN, 1, 1, handle_enableoutput },
{ "find", PERMISSION_READ, 2, -1, handle_find },
{ "findadd", PERMISSION_READ, 2, -1, handle_findadd},
{ "findin", PERMISSION_READ, 3, -1, handle_find_in },
{ "idle", PERMISSION_READ, 0, -1, handle_idle },
{ "kill", PERMISSION_ADMIN, -1, -1, handle_kill },
{ "list", PERMISSION_READ, 1, -1, handle_list },
@ -143,7 +142,6 @@ static const struct command commands[] = {
{ "search", PERMISSION_READ, 2, -1, handle_search },
{ "searchadd", PERMISSION_ADD, 2, -1, handle_searchadd },
{ "searchaddpl", PERMISSION_CONTROL, 3, -1, handle_searchaddpl },
{ "searchin", PERMISSION_READ, 3, -1, handle_search_in },
{ "seek", PERMISSION_CONTROL, 2, 2, handle_seek },
{ "seekcur", PERMISSION_CONTROL, 1, 1, handle_seekcur },
{ "seekid", PERMISSION_CONTROL, 2, 2, handle_seekid },

View File

@ -55,8 +55,7 @@ handle_lsinfo2(Client &client, int argc, char *argv[])
}
static CommandResult
handle_match(Client &client, int argc, char *argv[],
const char *uri, bool fold_case)
handle_match(Client &client, int argc, char *argv[], bool fold_case)
{
SongFilter filter;
if (!filter.Parse(argc - 1, argv + 1, fold_case)) {
@ -64,7 +63,7 @@ handle_match(Client &client, int argc, char *argv[],
return CommandResult::ERROR;
}
const DatabaseSelection selection(uri, true, &filter);
const DatabaseSelection selection("", true, &filter);
Error error;
return db_selection_print(client, selection, true, error)
@ -75,25 +74,13 @@ handle_match(Client &client, int argc, char *argv[],
CommandResult
handle_find(Client &client, int argc, char *argv[])
{
return handle_match(client, argc, argv, "", false);
}
CommandResult
handle_find_in(Client &client, int argc, char *argv[])
{
return handle_match(client, argc - 1, argv + 1, argv[1], false);
return handle_match(client, argc, argv, false);
}
CommandResult
handle_search(Client &client, int argc, char *argv[])
{
return handle_match(client, argc, argv, "", true);
}
CommandResult
handle_search_in(Client &client, int argc, char *argv[])
{
return handle_match(client, argc - 1, argv + 1, argv[1], true);
return handle_match(client, argc, argv, true);
}
static CommandResult

View File

@ -30,18 +30,12 @@ handle_lsinfo2(Client &client, int argc, char *argv[]);
CommandResult
handle_find(Client &client, int argc, char *argv[]);
CommandResult
handle_find_in(Client &client, int argc, char *argv[]);
CommandResult
handle_findadd(Client &client, int argc, char *argv[]);
CommandResult
handle_search(Client &client, int argc, char *argv[]);
CommandResult
handle_search_in(Client &client, int argc, char *argv[]);
CommandResult
handle_searchadd(Client &client, int argc, char *argv[]);