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
575fbad2
Commit
575fbad2
authored
Oct 25, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AllCommands: "commands" returns playlist commands only if playlist_directory configured
parent
fa0aa91b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
0 deletions
+25
-0
NEWS
NEWS
+2
-0
AllCommands.cxx
src/command/AllCommands.cxx
+10
-0
PlaylistCommands.cxx
src/command/PlaylistCommands.cxx
+8
-0
PlaylistCommands.hxx
src/command/PlaylistCommands.hxx
+5
-0
No files found.
NEWS
View file @
575fbad2
ver 0.20 (not yet released)
* protocol
- "commands" returns playlist commands only if playlist_directory configured
* output
- pulse: set channel map to WAVE-EX
...
...
src/command/AllCommands.cxx
View file @
575fbad2
...
...
@@ -210,6 +210,16 @@ command_available(gcc_unused const Partition &partition,
return
neighbor_commands_available
(
partition
.
instance
);
#endif
if
(
strcmp
(
cmd
->
cmd
,
"save"
)
==
0
||
strcmp
(
cmd
->
cmd
,
"rm"
)
==
0
||
strcmp
(
cmd
->
cmd
,
"rename"
)
==
0
||
strcmp
(
cmd
->
cmd
,
"playlistdelete"
)
==
0
||
strcmp
(
cmd
->
cmd
,
"playlistmove"
)
==
0
||
strcmp
(
cmd
->
cmd
,
"playlistclear"
)
==
0
||
strcmp
(
cmd
->
cmd
,
"playlistadd"
)
==
0
||
strcmp
(
cmd
->
cmd
,
"listplaylists"
)
==
0
)
return
playlist_commands_available
();
return
true
;
}
...
...
src/command/PlaylistCommands.cxx
View file @
575fbad2
...
...
@@ -35,9 +35,17 @@
#include "protocol/ArgParser.hxx"
#include "protocol/Result.hxx"
#include "ls.hxx"
#include "Mapper.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
bool
playlist_commands_available
()
{
return
!
map_spl_path
().
IsNull
();
}
static
void
print_spl_list
(
Client
&
client
,
const
PlaylistVector
&
list
)
{
...
...
src/command/PlaylistCommands.hxx
View file @
575fbad2
...
...
@@ -21,9 +21,14 @@
#define MPD_PLAYLIST_COMMANDS_HXX
#include "CommandResult.hxx"
#include "Compiler.h"
class
Client
;
gcc_const
bool
playlist_commands_available
();
CommandResult
handle_save
(
Client
&
client
,
unsigned
argc
,
char
*
argv
[]);
...
...
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