Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
61b08355
Commit
61b08355
authored
Apr 28, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command: added "sticker delete" command
parent
610940a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
protocol.xml
doc/protocol.xml
+18
-0
command.c
src/command.c
+22
-0
No files found.
doc/protocol.xml
View file @
61b08355
...
@@ -1273,6 +1273,24 @@ OK
...
@@ -1273,6 +1273,24 @@ OK
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry
id=
"command_sticker_delete"
>
<term>
<cmdsynopsis>
<command>
sticker
</command>
<arg
choice=
"plain"
>
delete
</arg>
<arg
choice=
"req"
><replaceable>
TYPE
</replaceable></arg>
<arg
choice=
"req"
><replaceable>
URI
</replaceable></arg>
<arg
choice=
"opt"
><replaceable>
NAME
</replaceable></arg>
</cmdsynopsis>
</term>
<listitem>
<para>
Deletes a sticker value from the specified object. If
you do not specify a sticker name, all sticker values
are deleted.
</para>
</listitem>
</varlistentry>
<varlistentry
id=
"command_sticker_list"
>
<varlistentry
id=
"command_sticker_list"
>
<term>
<term>
<cmdsynopsis>
<cmdsynopsis>
...
...
src/command.c
View file @
61b08355
...
@@ -1589,6 +1589,28 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
...
@@ -1589,6 +1589,28 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
}
}
return
COMMAND_RETURN_OK
;
return
COMMAND_RETURN_OK
;
}
else
if
((
argc
==
4
||
argc
==
5
)
&&
strcmp
(
argv
[
1
],
"delete"
)
==
0
)
{
struct
song
*
song
;
bool
ret
;
song
=
db_get_song
(
argv
[
3
]);
if
(
song
==
NULL
)
{
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
"no such song"
);
return
COMMAND_RETURN_ERROR
;
}
ret
=
argc
==
4
?
sticker_song_delete
(
song
)
:
sticker_song_delete_value
(
song
,
argv
[
4
]);
if
(
!
ret
)
{
command_error
(
client
,
ACK_ERROR_SYSTEM
,
"no such sticker"
);
return
COMMAND_RETURN_ERROR
;
}
return
COMMAND_RETURN_OK
;
}
else
if
(
argc
==
5
&&
strcmp
(
argv
[
1
],
"find"
)
==
0
)
{
}
else
if
(
argc
==
5
&&
strcmp
(
argv
[
1
],
"find"
)
==
0
)
{
/* "sticker find song a/directory name" */
/* "sticker find song a/directory name" */
struct
directory
*
directory
;
struct
directory
*
directory
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment