aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c
index 54703ca28..9c13948d6 100644
--- a/src/command.c
+++ b/src/command.c
@@ -84,6 +84,7 @@
#define COMMAND_CROSSFADE "crossfade"
#define COMMAND_URL_HANDLERS "urlhandlers"
#define COMMAND_PLCHANGES "plchanges"
+#define COMMAND_PLCHANGESPOSID "plchangesposid"
#define COMMAND_CURRENTSONG "currentsong"
#define COMMAND_ENABLE_DEV "enableoutput"
#define COMMAND_DISABLE_DEV "disableoutput"
@@ -414,6 +415,21 @@ int handlePlaylistChanges(FILE * fp, unsigned int * permission,
return playlistChanges(fp, version);
}
+int handlePlaylistChangesPosId(FILE * fp, unsigned int * permission,
+ int argArrayLength, char ** argArray)
+{
+ unsigned long version;
+ char * test;
+
+ version = strtoul(argArray[1], &test, 10);
+ if(*test!='\0') {
+ commandError(fp, ACK_ERROR_ARG, "need a positive integer",
+ NULL);
+ return -1;
+ }
+ return playlistChangesPosId(fp, version);
+}
+
int handlePlaylistInfo(FILE * fp, unsigned int * permission,
int argArrayLength, char ** argArray)
{
@@ -970,6 +986,7 @@ void initCommands() {
addCommand(COMMAND_CROSSFADE ,PERMISSION_CONTROL, 1, 1,handleCrossfade,NULL);
addCommand(COMMAND_URL_HANDLERS,PERMISSION_READ, 0, 0,handleUrlHandlers,NULL);
addCommand(COMMAND_PLCHANGES ,PERMISSION_READ, 1, 1,handlePlaylistChanges,NULL);
+ addCommand(COMMAND_PLCHANGESPOSID ,PERMISSION_READ, 1, 1,handlePlaylistChangesPosId,NULL);
addCommand(COMMAND_ENABLE_DEV ,PERMISSION_ADMIN, 1, 1,handleEnableDevice,NULL);
addCommand(COMMAND_DISABLE_DEV ,PERMISSION_ADMIN, 1, 1,handleDisableDevice,NULL);
addCommand(COMMAND_DEVICES ,PERMISSION_ADMIN, 0, 0,handleDevices,NULL);