Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

jsonrpc: fix Playlist.Add/Insert not working with "directory" (fixes …

…#14578)
  • Loading branch information...
commit 97c236ff469da8dc63394754f0e320d1893f0a1b 1 parent 72f100e
Sascha Montellese Montellese authored
2  xbmc/interfaces/json-rpc/PlaylistOperations.cpp
View
@@ -97,7 +97,7 @@ JSONRPC_STATUS CPlaylistOperations::GetItems(const CStdString &method, ITranspor
bool CPlaylistOperations::CheckMediaParameter(int playlist, const CVariant &parameterObject)
{
- if (parameterObject["item"].isMember("media"))
+ if (parameterObject["item"].isMember("media") && parameterObject["item"]["media"].asString().compare("files") != 0)
{
if (playlist == PLAYLIST_VIDEO && parameterObject["item"]["media"].asString().compare("video") != 0)
return false;
4 xbmc/interfaces/json-rpc/ServiceDescription.h
View
@@ -22,7 +22,7 @@
namespace JSONRPC
{
const char* const JSONRPC_SERVICE_ID = "http://xbmc.org/jsonrpc/ServiceDescription.json";
- const char* const JSONRPC_SERVICE_VERSION = "6.6.0";
+ const char* const JSONRPC_SERVICE_VERSION = "6.6.1";
const char* const JSONRPC_SERVICE_DESCRIPTION = "JSON-RPC API of XBMC";
const char* const JSONRPC_SERVICE_TYPES[] = {
@@ -174,7 +174,7 @@ namespace JSONRPC
"\"Playlist.Item\": {"
"\"type\": ["
"{ \"type\": \"object\", \"properties\": { \"file\": { \"type\": \"string\", \"description\": \"Path to a file (not a directory) to be added to the playlist\", \"required\": true } }, \"additionalProperties\": false },"
- "{ \"type\": \"object\", \"properties\": { \"directory\": { \"type\": \"string\", \"required\": true }, \"recursive\": { \"type\": \"boolean\", \"default\": false }, \"media\": { \"$ref\": \"Files.Media\" } }, \"additionalProperties\": false },"
+ "{ \"type\": \"object\", \"properties\": { \"directory\": { \"type\": \"string\", \"required\": true }, \"recursive\": { \"type\": \"boolean\", \"default\": false }, \"media\": { \"$ref\": \"Files.Media\", \"default\": \"files\" } }, \"additionalProperties\": false },"
"{ \"type\": \"object\", \"properties\": { \"movieid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
"{ \"type\": \"object\", \"properties\": { \"episodeid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
"{ \"type\": \"object\", \"properties\": { \"musicvideoid\": { \"$ref\": \"Library.Id\", \"required\": true } }, \"additionalProperties\": false },"
2  xbmc/interfaces/json-rpc/types.json
View
@@ -147,7 +147,7 @@
"Playlist.Item": {
"type": [
{ "type": "object", "properties": { "file": { "type": "string", "description": "Path to a file (not a directory) to be added to the playlist", "required": true } }, "additionalProperties": false },
- { "type": "object", "properties": { "directory": { "type": "string", "required": true }, "recursive": { "type": "boolean", "default": false }, "media": { "$ref": "Files.Media" } }, "additionalProperties": false },
+ { "type": "object", "properties": { "directory": { "type": "string", "required": true }, "recursive": { "type": "boolean", "default": false }, "media": { "$ref": "Files.Media", "default": "files" } }, "additionalProperties": false },
{ "type": "object", "properties": { "movieid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
{ "type": "object", "properties": { "episodeid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
{ "type": "object", "properties": { "musicvideoid": { "$ref": "Library.Id", "required": true } }, "additionalProperties": false },
Please sign in to comment.
Something went wrong with that request. Please try again.