The branch, master has been updated
via 253dd7e808d1e7a8368249dc851c1f2066dd59c1 (commit)
via c00ff2defb35333206f2529b47829d16be088233 (commit)
via 6c9af5c7c0ae8075c0f83a5eb71d58fa053e37ce (commit)
via c2d1e992fdd64f380d6720e9b28ffab7aba07ea2 (commit)
via 845288d417d40dea22f6dd71ceba30b4587f9999 (commit)
from e3301732fdda09ef470aac9640c95a656fff1959 (commit)
https://github.com/xbmc/xbmc/commit/253dd7e808d1e7a8368249dc851c1f2066dd59c1
commit 253dd7e808d1e7a8368249dc851c1f2066dd59c1
Author: montellese <montellese@...>
Date: Sat Oct 8 00:54:59 2011 +0200
jsonrpc: refactor (Audio|Video)Library.Export parameters
diff --git a/xbmc/interfaces/json-rpc/AudioLibrary.cpp b/xbmc/interfaces/json-rpc/AudioLibrary.cpp
index 3da5808..fa2e17c 100644
--- a/xbmc/interfaces/json-rpc/AudioLibrary.cpp
+++ b/xbmc/interfaces/json-rpc/AudioLibrary.cpp
@@ -244,20 +244,13 @@ JSON_STATUS CAudioLibrary::Scan(const CStdString &method, ITransportLayer *trans
JSON_STATUS CAudioLibrary::Export(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result)
{
- CStdString path = parameterObject["path"].asString();
- bool singleFile = parameterObject["singlefile"].asBoolean();
-
- if (!singleFile && path.IsEmpty())
- return InvalidParams;
-
CStdString cmd;
- if (singleFile)
- cmd.Format("exportlibrary(music, true, %s, %s, %s)",
- parameterObject["images"].asBoolean() ? "true" : "false",
- parameterObject["overwrite"].asBoolean() ? "true" : "false",
- parameterObject["actorthumbs"].asBoolean() ? "true" : "false");
+ if (parameterObject["options"].isMember("path"))
+ cmd.Format("exportlibrary(music, false, %s)", parameterObject["options"]["path"].asString());
else
- cmd.Format("exportlibrary(music, false, %s)", path);
+ cmd.Format("exportlibrary(music, true, %s, %s)",
+ parameterObject["options"]["images"].asBoolean() ? "true" : "false",
+ parameterObject["options"]["overwrite"].asBoolean() ? "true" : "false");
g_application.getApplicationMessenger().ExecBuiltIn(cmd);
return ACK;
diff --git a/xbmc/interfaces/json-rpc/ServiceDescription.h b/xbmc/interfaces/json-rpc/ServiceDescription.h
index f67e6eb..74e6383 100644
--- a/xbmc/interfaces/json-rpc/ServiceDescription.h
+++ b/xbmc/interfaces/json-rpc/ServiceDescription.h
@@ -1515,10 +1515,20 @@ namespace JSONRPC
"\"transport\": \"Response\","
"\"permission\": \"WriteFile\","
"\"params\": ["
- "{ \"name\": \"singlefile\", \"type\": \"boolean\", \"default\": true, \"description\": \"Whether to export the data into one or multiple files\" },"
- "{ \"name\": \"images\", \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export thumbnails and fanart images\" },"
- "{ \"name\": \"overwrite\", \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to overwrite existing exported files\" },"
- "{ \"name\": \"path\", \"type\": \"string\", \"default\": \"\", \"description\": \"Path to the directory to where the data should be exported\" }"
+ "{ \"name\": \"options\", \"type\": ["
+ "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
+ "\"properties\": {"
+ "\"path\": { \"type\": \"string\", \"required\": true, \"minLength\": 1, \"description\": \"Path to the directory to where the data should be exported\" }"
+ "}"
+ "},"
+ "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
+ "\"properties\": {"
+ "\"overwrite\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to overwrite existing exported files\" },"
+ "\"images\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export thumbnails and fanart images\" }"
+ "}"
+ "}"
+ "]"
+ "}"
"],"
"\"returns\": \"string\""
"}",
@@ -1824,11 +1834,21 @@ namespace JSONRPC
"\"transport\": \"Response\","
"\"permission\": \"WriteFile\","
"\"params\": ["
- "{ \"name\": \"singlefile\", \"type\": \"boolean\", \"default\": true, \"description\": \"Whether to export the data into one or multiple files\" },"
- "{ \"name\": \"images\", \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export thumbnails and fanart images\" },"
- "{ \"name\": \"actorthumbs\", \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export actor thumbnails\" },"
- "{ \"name\": \"overwrite\", \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to overwrite existing exported files\" },"
- "{ \"name\": \"path\", \"type\": \"string\", \"default\": \"\", \"description\": \"Path to the directory to where the data should be exported\" }"
+ "{ \"name\": \"options\", \"type\": ["
+ "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
+ "\"properties\": {"
+ "\"path\": { \"type\": \"string\", \"required\": true, \"minLength\": 1, \"description\": \"Path to the directory to where the data should be exported\" }"
+ "}"
+ "},"
+ "{ \"type\": \"object\", \"required\": true, \"additionalProperties\": false,"
+ "\"properties\": {"
+ "\"overwrite\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to overwrite existing exported files\" },"
+ "\"images\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export thumbnails and fanart images\" },"
+ "\"actorthumbs\": { \"type\": \"boolean\", \"default\": false, \"description\": \"Whether to export actor thumbnails\" }"
+ "}"
+ "}"
+ "]"
+ "}"
"],"
"\"returns\": \"string\""
"}",
diff --git a/xbmc/interfaces/json-rpc/VideoLibrary.cpp b/xbmc/interfaces/json-rpc/VideoLibrary.cpp
index 8053cf3..7e27d94 100644
--- a/xbmc/interfaces/json-rpc/VideoLibrary.cpp
+++ b/xbmc/interfaces/json-rpc/VideoLibrary.cpp
@@ -344,20 +344,14 @@ JSON_STATUS CVideoLibrary::Scan(const CStdString &method, ITransportLayer *trans
JSON_STATUS CVideoLibrary::Export(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result)
{
- CStdString path = parameterObject["path"].asString();
- bool singleFile = parameterObject["singlefile"].asBoolean();
-
- if (!singleFile && path.IsEmpty())
- return InvalidParams;
-
CStdString cmd;
- if (singleFile)
- cmd.Format("exportlibrary(video, true, %s, %s, %s)",
- parameterObject["images"].asBoolean() ? "true" : "false",
- parameterObject["overwrite"].asBoolean() ? "true" : "false",
- parameterObject["actorthumbs"].asBoolean() ? "true" : "false");
+ if (parameterObject["options"].isMember("path"))
+ cmd.Format("exportlibrary(video, false, %s)", parameterObject["options"]["path"].asString());
else
- cmd.Format("exportlibrary(video, false, %s)", path);
+ cmd.Format("exportlibrary(video, true, %s, %s, %s)",
+ parameterObject["options"]["images"].asBoolean() ? "true" : "false",
+ parameterObject["options"]["overwrite"].asBoolean() ? "true" : "false",
+ parameterObject["options"]["actorthumbs"].asBoolean() ? "true" : "false");
g_application.getApplicationMessenger().ExecBuiltIn(cmd);
return ACK;
diff --git a/xbmc/interfaces/json-rpc/methods.json b/xbmc/interfaces/json-rpc/methods.json
index ae1cca1..c209621 100644
--- a/xbmc/interfaces/json-rpc/methods.json
+++ b/xbmc/interfaces/json-rpc/methods.json
@@ -738,10 +738,20 @@
"transport": "Response",
"permission": "WriteFile",
"params": [
- { "name": "singlefile", "type": "boolean", "default": true, "description": "Whether to export the data into one or multiple files" },
- { "name": "images", "type": "boolean", "default": false, "description": "Whether to export thumbnails and fanart images" },
- { "name": "overwrite", "type": "boolean", "default": false, "description": "Whether to overwrite existing exported files" },
- { "name": "path", "type": "string", "default": "", "description": "Path to the directory to where the data should be exported" }
+ { "name": "options", "type": [
+ { "type": "object", "required": true, "additionalProperties": false,
+ "properties": {
+ "path": { "type": "string", "required": true, "minLength": 1, "description": "Path to the directory to where the data should be exported" }
+ }
+ },
+ { "type": "object", "required": true, "additionalProperties": false,
+ "properties": {
+ "overwrite": { "type": "boolean", "default": false, "description": "Whether to overwrite existing exported files" },
+ "images": { "type": "boolean", "default": false, "description": "Whether to export thumbnails and fanart images" }
+ }
+ }
+ ]
+ }
],
"returns": "string"
},
@@ -1047,11 +1057,21 @@
"transport": "Response",
"permission": "WriteFile",
"params": [
- { "name": "singlefile", "type": "boolean", "default": true, "description": "Whether to export the data into one or multiple files" },
- { "name": "images", "type": "boolean", "default": false, "description": "Whether to export thumbnails and fanart images" },
- { "name": "actorthumbs", "type": "boolean", "default": false, "description": "Whether to export actor thumbnails" },
- { "name": "overwrite", "type": "boolean", "default": false, "description": "Whether to overwrite existing exported files" },
- { "name": "path", "type": "string", "default": "", "description": "Path to the directory to where the data should be exported" }
+ { "name": "options", "type": [
+ { "type": "object", "required": true, "additionalProperties": false,
+ "properties": {
+ "path": { "type": "string", "required": true, "minLength": 1, "description": "Path to the directory to where the data should be exported" }
+ }
+ },
+ { "type": "object", "required": true, "additionalProperties": false,
+ "properties": {
+ "overwrite": { "type": "boolean", "default": false, "description": "Whether to overwrite existing exported files" },
+ "images": { "type": "boolean", "default": false, "description": "Whether to export thumbnails and fanart images" },
+ "actorthumbs": { "type": "boolean", "default": false, "description": "Whether to export actor thumbnails" }
+ }
+ }
+ ]
+ }
],
"returns": "string"
},
https://github.com/xbmc/xbmc/commit/c00ff2defb35333206f2529b47829d16be088233
commit c00ff2defb35333206f2529b47829d16be088233
Author: montellese <montellese@...>
Date: Sat Oct 8 00:10:26 2011 +0200
jsonrpc: rename "albums" parameter of AudioLibrary.GetRecentlyAddedSongs to "albumlimit"
diff --git a/xbmc/interfaces/json-rpc/AudioLibrary.cpp b/xbmc/interfaces/json-rpc/AudioLibrary.cpp
index 07738b0..3da5808 100644
--- a/xbmc/interfaces/json-rpc/AudioLibrary.cpp
+++ b/xbmc/interfaces/json-rpc/AudioLibrary.cpp
@@ -204,7 +204,7 @@ JSON_STATUS CAudioLibrary::GetRecentlyAddedSongs(const CStdString &method, ITran
if (!musicdatabase.Open())
return InternalError;
- int amount = (int)parameterObject["albums"].asInteger();
+ int amount = (int)parameterObject["albumlimit"].asInteger();
if (amount < 0)
amount = 0;
diff --git a/xbmc/interfaces/json-rpc/ServiceDescription.h b/xbmc/interfaces/json-rpc/ServiceDescription.h
index a18ab69..f67e6eb 100644
--- a/xbmc/interfaces/json-rpc/ServiceDescription.h
+++ b/xbmc/interfaces/json-rpc/ServiceDescription.h
@@ -1466,7 +1466,7 @@ namespace JSONRPC
"\"transport\": \"Response\","
"\"permission\": \"ReadData\","
"\"params\": ["
- "{ \"name\": \"albums\", \"$ref\": \"List.Amount\", \"description\": \"The amount of recently added albums from which to return the songs\" },"
+ "{ \"name\": \"albumlimit\", \"$ref\": \"List.Amount\", \"description\": \"The amount of recently added albums from which to return the songs\" },"
"{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Song\" },"
"{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
"{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
diff --git a/xbmc/interfaces/json-rpc/methods.json b/xbmc/interfaces/json-rpc/methods.json
index 232402a..ae1cca1 100644
--- a/xbmc/interfaces/json-rpc/methods.json
+++ b/xbmc/interfaces/json-rpc/methods.json
@@ -689,7 +689,7 @@
"transport": "Response",
"permission": "ReadData",
"params": [
- { "name": "albums", "$ref": "List.Amount", "description": "The amount of recently added albums from which to return the songs" },
+ { "name": "albumlimit", "$ref": "List.Amount", "description": "The amount of recently added albums from which to return the songs" },
{ "name": "properties", "$ref": "Audio.Fields.Song" },
{ "name": "limits", "$ref": "List.Limits" },
{ "name": "sort", "$ref": "List.Sort" }
https://github.com/xbmc/xbmc/commit/6c9af5c7c0ae8075c0f83a5eb71d58fa053e37ce
commit 6c9af5c7c0ae8075c0f83a5eb71d58fa053e37ce
Author: montellese <montellese@...>
Date: Sat Oct 8 00:07:18 2011 +0200
jsonrpc: remove optional "albums" parameter from AudioLibrary.GetRecentlyAddedAlbums (use the "limits" parameter instead)
diff --git a/xbmc/interfaces/json-rpc/AudioLibrary.cpp b/xbmc/interfaces/json-rpc/AudioLibrary.cpp
index 9fa535d..07738b0 100644
--- a/xbmc/interfaces/json-rpc/AudioLibrary.cpp
+++ b/xbmc/interfaces/json-rpc/AudioLibrary.cpp
@@ -176,12 +176,8 @@ JSON_STATUS CAudioLibrary::GetRecentlyAddedAlbums(const CStdString &method, ITra
if (!musicdatabase.Open())
return InternalError;
- int amount = (int)parameterObject["albums"].asInteger();
- if (amount < 0)
- amount = 0;
-
VECALBUMS albums;
- if (musicdatabase.GetRecentlyAddedAlbums(albums, (unsigned int)amount))
+ if (musicdatabase.GetRecentlyAddedAlbums(albums))
{
CFileItemList items;
diff --git a/xbmc/interfaces/json-rpc/ServiceDescription.h b/xbmc/interfaces/json-rpc/ServiceDescription.h
index bc63e1b..a18ab69 100644
--- a/xbmc/interfaces/json-rpc/ServiceDescription.h
+++ b/xbmc/interfaces/json-rpc/ServiceDescription.h
@@ -1446,7 +1446,6 @@ namespace JSONRPC
"\"transport\": \"Response\","
"\"permission\": \"ReadData\","
"\"params\": ["
- "{ \"name\": \"albums\", \"$ref\": \"List.Amount\" },"
"{ \"name\": \"properties\", \"$ref\": \"Audio.Fields.Album\" },"
"{ \"name\": \"limits\", \"$ref\": \"List.Limits\" },"
"{ \"name\": \"sort\", \"$ref\": \"List.Sort\" }"
diff --git a/xbmc/interfaces/json-rpc/methods.json b/xbmc/interfaces/json-rpc/methods.json
index 4a4b6c3..232402a 100644
--- a/xbmc/interfaces/json-rpc/methods.json
+++ b/xbmc/interfaces/json-rpc/methods.json
@@ -669,7 +669,6 @@
"transport": "Response",
"permission": "ReadData",
"params": [
- { "name": "albums", "$ref": "List.Amount" },
{ "name": "properties", "$ref": "Audio.Fields.Album" },
{ "name": "limits", "$ref": "List.Limits" },
{ "name": "sort", "$ref": "List.Sort" }
https://github.com/xbmc/xbmc/commit/c2d1e992fdd64f380d6720e9b28ffab7aba07ea2
commit c2d1e992fdd64f380d6720e9b28ffab7aba07ea2
Author: montellese <montellese@...>
Date: Fri Oct 7 23:55:32 2011 +0200
jsonrpc: refactor Application.ToggleMute into Application.SetMute
diff --git a/addons/webinterface.default/js/MediaLibrary.js b/addons/webinterface.default/js/MediaLibrary.js
index 90d2e73..81ba4fa 100755
--- a/addons/webinterface.default/js/MediaLibrary.js
+++ b/addons/webinterface.default/js/MediaLibrary.js
@@ -171,7 +171,7 @@ MediaLibrary.prototype = {
jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Input.Home", "id": 1}', function(data){$('#spinner').hide();}, 'json');
return;
case 'mute':
- jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Application.ToggleMute", "id": 1}', function(data){$('#spinner').hide();}, 'json');
+ jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Application.SetMute", "params": { "mute": "toggle" }, "id": 1}', function(data){$('#spinner').hide();}, 'json');
return;
case 'power':
jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "System.Shutdown", "id": 1}', function(data){$('#spinner').hide();}, 'json');
diff --git a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
index 4706185..8a4372c 100644
--- a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
+++ b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
@@ -61,10 +61,15 @@ JSON_STATUS CApplicationOperations::SetVolume(const CStdString &method, ITranspo
return GetPropertyValue("volume", result);
}
-JSON_STATUS CApplicationOperations::ToggleMute(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result)
+JSON_STATUS CApplicationOperations::SetMute(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result)
{
- g_application.getApplicationMessenger().SendAction(CAction(ACTION_MUTE));
- return GetPropertyValue("volume", result);
+ if ((parameterObject["mute"].isString() && parameterObject["mute"].asString().compare("toggle") == 0) ||
+ (parameterObject["mute"].isBoolean() && parameterObject["mute"].asBoolean() != g_application.IsMuted()))
+ g_application.getApplicationMessenger().SendAction(CAction(ACTION_MUTE));
+ else if (!parameterObject["mute"].isBoolean() && !parameterObject["mute"].isString())
+ return InvalidParams;
+
+ return GetPropertyValue("muted", result);
}
JSON_STATUS CApplicationOperations::Quit(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result)
diff --git a/xbmc/interfaces/json-rpc/ApplicationOperations.h b/xbmc/interfaces/json-rpc/ApplicationOperations.h
index 033d82f..139a29a 100644
--- a/xbmc/interfaces/json-rpc/ApplicationOperations.h
+++ b/xbmc/interfaces/json-rpc/ApplicationOperations.h
@@ -32,7 +32,7 @@ namespace JSONRPC
static JSON_STATUS GetProperties(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result);
static JSON_STATUS SetVolume(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result);
- static JSON_STATUS ToggleMute(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result);
+ static JSON_STATUS SetMute(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result);
static JSON_STATUS Quit(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result);
private:
diff --git a/xbmc/interfaces/json-rpc/JSONServiceDescription.cpp b/xbmc/interfaces/json-rpc/JSONServiceDescription.cpp
index 99f8143..850ae54 100644
--- a/xbmc/interfaces/json-rpc/JSONServiceDescription.cpp
+++ b/xbmc/interfaces/json-rpc/JSONServiceDescription.cpp
@@ -183,7 +183,7 @@ JsonRpcMethodMap CJSONServiceDescription::m_methodMaps[] = {
// Application operations
{ "Application.GetProperties", CApplicationOperations::GetProperties },
{ "Application.SetVolume", CApplicationOperations::SetVolume },
- { "Application.ToggleMute", CApplicationOperations::ToggleMute },
+ { "Application.SetMute", CApplicationOperations::SetMute },
{ "Application.Quit", CApplicationOperations::Quit },
// XBMC operations
diff --git a/xbmc/interfaces/json-rpc/ServiceDescription.h b/xbmc/interfaces/json-rpc/ServiceDescription.h
index aabc9fd..bc63e1b 100644
--- a/xbmc/interfaces/json-rpc/ServiceDescription.h
+++ b/xbmc/interfaces/json-rpc/ServiceDescription.h
@@ -1959,13 +1959,19 @@ namespace JSONRPC
"],"
"\"returns\": \"integer\""
"}",
- "\"Application.ToggleMute\": {"
+ "\"Application.SetMute\": {"
"\"type\": \"method\","
"\"description\": \"Toggle mute/unmute\","
"\"transport\": \"Response\","
"\"permission\": \"ControlPlayback\","
- "\"params\": [],"
- "\"returns\": { \"type\": \"integer\", \"description\": \"New volume\" }"
+ "\"params\": ["
+ "{ \"name\": \"mute\", \"required\": true, \"type\": ["
+ "{ \"type\": \"boolean\", \"required\": true },"
+ "{ \"type\": \"string\", \"enum\": [ \"toggle\" ], \"required\": true }"
+ "]"
+ "}"
+ "],"
+ "\"returns\": { \"type\": \"boolean\", \"description\": \"Mute state\" }"
"}",
"\"Application.Quit\": {"
"\"type\": \"method\","
diff --git a/xbmc/interfaces/json-rpc/methods.json b/xbmc/interfaces/json-rpc/methods.json
index d66dcd5..4a4b6c3 100644
--- a/xbmc/interfaces/json-rpc/methods.json
+++ b/xbmc/interfaces/json-rpc/methods.json
@@ -1182,13 +1182,19 @@
],
"returns": "integer"
},
- "Application.ToggleMute": {
+ "Application.SetMute": {
"type": "method",
"description": "Toggle mute/unmute",
"transport": "Response",
"permission": "ControlPlayback",
- "params": [],
- "returns": { "type": "integer", "description": "New volume" }
+ "params": [
+ { "name": "mute", "required": true, "type": [
+ { "type": "boolean", "required": true },
+ { "type": "string", "enum": [ "toggle" ], "required": true }
+ ]
+ }
+ ],
+ "returns": { "type": "boolean", "description": "Mute state" }
},
"Application.Quit": {
"type": "method",
https://github.com/xbmc/xbmc/commit/845288d417d40dea22f6dd71ceba30b4587f9999
commit 845288d417d40dea22f6dd71ceba30b4587f9999
Author: montellese <montellese@...>
Date: Fri Oct 7 23:29:59 2011 +0200
jsonrpc: rename "value" parameter of Application.SetVolume to "volume"
diff --git a/addons/webinterface.default/js/MediaLibrary.js b/addons/webinterface.default/js/MediaLibrary.js
index 18befec..90d2e73 100755
--- a/addons/webinterface.default/js/MediaLibrary.js
+++ b/addons/webinterface.default/js/MediaLibrary.js
@@ -179,7 +179,7 @@ MediaLibrary.prototype = {
case 'volumeup':
jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Application.GetProperties", "params": { "properties": [ "volume" ] }, "id": 1}', function(data){
var volume = data.result.volume + 1;
- jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "value": '+volume+' }, "id": 1}', function(data){
+ jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "volume": '+volume+' }, "id": 1}', function(data){
$('#spinner').hide();
}, 'json');
@@ -188,7 +188,7 @@ MediaLibrary.prototype = {
case 'volumedown':
jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Application.GetProperties", "params": { "properties": [ "volume" ] }, "id": 1}', function(data){
var volume = data.result.volume - 1;
- jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "value": '+volume+' }, "id": 1}', function(data){
+ jQuery.post(JSON_RPC + '?SendRemoteKey', '{"jsonrpc": "2.0", "method": "Application.SetVolume", "params": { "volume": '+volume+' }, "id": 1}', function(data){
$('#spinner').hide();
}, 'json');
diff --git a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
index 68107a8..4706185 100644
--- a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
+++ b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
@@ -52,7 +52,7 @@ JSON_STATUS CApplicationOperations::GetProperties(const CStdString &method, ITra
JSON_STATUS CApplicationOperations::SetVolume(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result)
{
int oldVolume = g_application.GetVolume();
- int volume = (int)parameterObject["value"].asInteger();
+ int volume = (int)parameterObject["volume"].asInteger();
g_application.SetVolume(volume);
diff --git a/xbmc/interfaces/json-rpc/ServiceDescription.h b/xbmc/interfaces/json-rpc/ServiceDescription.h
index 5750863..aabc9fd 100644
--- a/xbmc/interfaces/json-rpc/ServiceDescription.h
+++ b/xbmc/interfaces/json-rpc/ServiceDescription.h
@@ -1955,7 +1955,7 @@ namespace JSONRPC
"\"transport\": \"Response\","
"\"permission\": \"ControlPlayback\","
"\"params\": ["
- "{ \"name\": \"value\", \"type\": \"integer\", \"minimum\": 0, \"maximum\": 100, \"required\": true }"
+ "{ \"name\": \"volume\", \"type\": \"integer\", \"minimum\": 0, \"maximum\": 100, \"required\": true }"
"],"
"\"returns\": \"integer\""
"}",
diff --git a/xbmc/interfaces/json-rpc/methods.json b/xbmc/interfaces/json-rpc/methods.json
index 116bf37..d66dcd5 100644
--- a/xbmc/interfaces/json-rpc/methods.json
+++ b/xbmc/interfaces/json-rpc/methods.json
@@ -1178,7 +1178,7 @@
"transport": "Response",
"permission": "ControlPlayback",
"params": [
- { "name": "value", "type": "integer", "minimum": 0, "maximum": 100, "required": true }
+ { "name": "volume", "type": "integer", "minimum": 0, "maximum": 100, "required": true }
],
"returns": "integer"
},
-----------------------------------------------------------------------
Summary of changes:
addons/webinterface.default/js/MediaLibrary.js | 6 +-
xbmc/interfaces/json-rpc/ApplicationOperations.cpp | 13 +++--
xbmc/interfaces/json-rpc/ApplicationOperations.h | 2 +-
xbmc/interfaces/json-rpc/AudioLibrary.cpp | 25 +++------
.../interfaces/json-rpc/JSONServiceDescription.cpp | 2 +-
xbmc/interfaces/json-rpc/ServiceDescription.h | 55 ++++++++++++++-----
xbmc/interfaces/json-rpc/VideoLibrary.cpp | 18 ++----
xbmc/interfaces/json-rpc/methods.json | 55 ++++++++++++++-----
8 files changed, 107 insertions(+), 69 deletions(-)
hooks/post-receive
--
[xbmc/xbmc]
|