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
9c983c44
Commit
9c983c44
authored
Oct 22, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command: added command "listplaylists"
"listplaylists" returns a list of all stored playlists. This command seems more elaborate than listing them below "lsinfo".
parent
f8e58640
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
COMMANDS
doc/COMMANDS
+7
-0
command.c
src/command.c
+17
-0
No files found.
doc/COMMANDS
View file @
9c983c44
...
...
@@ -119,6 +119,10 @@ load <string name>
lsinfo <string directory>
list contents of _directory_, from the db. _directory_ is optional
When listing the root directory, this currently returns the
list of stored playlists. This behavior is deprecated; use
"listplaylists" instead.
move <int from> <int to>
move song at _from_ to _to_ in the playlist
increments playlist version by 1
...
...
@@ -184,6 +188,9 @@ random <int state>
repeat <int state>
set repeat state to _state_, _state_ should be 0 or 1
listplaylists
prints a list of the playlist directory
rm <string name>
removes the playlist <name>.m3u from the playlist directory
...
...
src/command.c
View file @
9c983c44
...
...
@@ -1157,6 +1157,22 @@ static int handlePlaylistAdd(struct client *client,
}
static
int
handle_list_playlists
(
struct
client
*
client
,
mpd_unused
int
argc
,
mpd_unused
char
*
argv
[])
{
GPtrArray
*
list
=
spl_list
();
if
(
list
==
NULL
)
{
command_error
(
client
,
ACK_ERROR_SYSTEM
,
"failed to get list of stored playlists"
);
return
-
1
;
}
print_spl_list
(
client
,
list
);
spl_list_free
(
list
);
return
0
;
}
static
int
handle_idle
(
struct
client
*
client
,
mpd_unused
int
argc
,
mpd_unused
char
*
argv
[])
{
...
...
@@ -1194,6 +1210,7 @@ static const struct command commands[] = {
{
"listallinfo"
,
PERMISSION_READ
,
0
,
1
,
handleListAllInfo
},
{
"listplaylist"
,
PERMISSION_READ
,
1
,
1
,
handleListPlaylist
},
{
"listplaylistinfo"
,
PERMISSION_READ
,
1
,
1
,
handleListPlaylistInfo
},
{
"listplaylists"
,
PERMISSION_READ
,
0
,
0
,
handle_list_playlists
},
{
"load"
,
PERMISSION_ADD
,
1
,
1
,
handleLoad
},
{
"lsinfo"
,
PERMISSION_READ
,
0
,
1
,
handleLsInfo
},
{
"move"
,
PERMISSION_CONTROL
,
2
,
2
,
handleMove
},
...
...
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