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
206392ad
Commit
206392ad
authored
Jul 06, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command: removed the "volume" command
This command has been deprecated more than 5 years ago (0.10.0). Its implementation is a kludge, let's remove it now.
parent
171a9ee2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
41 deletions
+2
-41
NEWS
NEWS
+1
-0
protocol.xml
doc/protocol.xml
+0
-19
command.c
src/command.c
+1
-22
No files found.
NEWS
View file @
206392ad
...
...
@@ -2,6 +2,7 @@ ver 0.16 (20??/??/??)
* protocol:
- send song modification time to client
- added "update" idle event
- removed the deprecated "volume" command
* decoders:
- ffmpeg: support multiple tags
* mixers:
...
...
doc/protocol.xml
View file @
206392ad
...
...
@@ -472,25 +472,6 @@
</para>
</listitem>
</varlistentry>
<varlistentry
id=
"command_volume"
>
<term>
<cmdsynopsis>
<command>
volume
</command>
<arg
choice=
"req"
><replaceable>
CHANGE
</replaceable></arg>
</cmdsynopsis>
</term>
<listitem>
<para>
Changes volume by amount
<varname>
CHANGE
</varname>
.
</para>
<note>
<para>
<command>
volume
</command>
is deprecated, use
<command>
setvol
</command>
instead.
</para>
</note>
</listitem>
</varlistentry>
</variablelist>
</section>
...
...
src/command.c
View file @
206392ad
...
...
@@ -58,7 +58,6 @@
#include <stdlib.h>
#include <errno.h>
#define COMMAND_STATUS_VOLUME "volume"
#define COMMAND_STATUS_STATE "state"
#define COMMAND_STATUS_REPEAT "repeat"
#define COMMAND_STATUS_SINGLE "single"
...
...
@@ -470,7 +469,7 @@ handle_status(struct client *client,
}
client_printf
(
client
,
COMMAND_STATUS_VOLUME
"
: %i
\n
"
"volume
: %i
\n
"
COMMAND_STATUS_REPEAT
": %i
\n
"
COMMAND_STATUS_RANDOM
": %i
\n
"
COMMAND_STATUS_SINGLE
": %i
\n
"
...
...
@@ -1054,25 +1053,6 @@ handle_listall(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
}
static
enum
command_return
handle_volume
(
struct
client
*
client
,
G_GNUC_UNUSED
int
argc
,
char
*
argv
[])
{
int
change
;
bool
success
;
if
(
!
check_int
(
client
,
&
change
,
argv
[
1
],
need_integer
))
return
COMMAND_RETURN_ERROR
;
success
=
volume_level_change
(
change
,
true
);
if
(
!
success
)
{
command_error
(
client
,
ACK_ERROR_SYSTEM
,
"problems setting volume"
);
return
COMMAND_RETURN_ERROR
;
}
return
COMMAND_RETURN_OK
;
}
static
enum
command_return
handle_setvol
(
struct
client
*
client
,
G_GNUC_UNUSED
int
argc
,
char
*
argv
[])
{
int
level
;
...
...
@@ -1740,7 +1720,6 @@ static const struct command commands[] = {
{
"tagtypes"
,
PERMISSION_READ
,
0
,
0
,
handle_tagtypes
},
{
"update"
,
PERMISSION_ADMIN
,
0
,
1
,
handle_update
},
{
"urlhandlers"
,
PERMISSION_READ
,
0
,
0
,
handle_urlhandlers
},
{
"volume"
,
PERMISSION_CONTROL
,
1
,
1
,
handle_volume
},
};
static
const
unsigned
num_commands
=
sizeof
(
commands
)
/
sizeof
(
commands
[
0
]);
...
...
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