diff options
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/command.c b/src/command.c index c725282aa..9793830c1 100644 --- a/src/command.c +++ b/src/command.c @@ -275,7 +275,8 @@ handle_urlhandlers(struct client *client, { if (client_get_uid(client) > 0) client_puts(client, "handler: file://\n"); - return printRemoteUrlHandlers(client); + printRemoteUrlHandlers(client); + return COMMAND_RETURN_OK; } static enum command_return @@ -449,6 +450,12 @@ handle_add(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) if (isRemoteUrl(path)) return addToPlaylist(path, NULL); + if (uri_has_scheme(path)) { + command_error(client, ACK_ERROR_NO_EXIST, + "unsupported URI scheme"); + return COMMAND_RETURN_ERROR; + } + result = addAllIn(path); if (result == (enum playlist_result)-1) { command_error(client, ACK_ERROR_NO_EXIST, @@ -1222,7 +1229,11 @@ handle_playlistadd(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) if (isRemoteUrl(path)) result = spl_append_uri(path, playlist); - else + else if (uri_has_scheme(path)) { + command_error(client, ACK_ERROR_NO_EXIST, + "unsupported URI scheme"); + return COMMAND_RETURN_ERROR; + } else result = addAllInToStoredPlaylist(path, playlist); if (result == (enum playlist_result)-1) { |