Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

jsonrpc: added (Video|Audio)Library.Clean

  • Loading branch information...
commit fecb24254184c3b5eaae2537e2679b138ae6af86 1 parent d8e43a2
@Montellese Montellese authored
View
6 xbmc/interfaces/json-rpc/AudioLibrary.cpp
@@ -267,6 +267,12 @@ JSON_STATUS CAudioLibrary::Export(const CStdString &method, ITransportLayer *tra
return ACK;
}
+JSON_STATUS CAudioLibrary::Clean(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result)
+{
+ g_application.getApplicationMessenger().ExecBuiltIn("cleanlibrary(music)");
+ return ACK;
+}
+
bool CAudioLibrary::FillFileItem(const CStdString &strFilename, CFileItem &item)
{
CMusicDatabase musicdatabase;
View
1  xbmc/interfaces/json-rpc/AudioLibrary.h
@@ -41,6 +41,7 @@ namespace JSONRPC
static JSON_STATUS Scan(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
static JSON_STATUS Export(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
+ static JSON_STATUS Clean(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
static bool FillFileItem(const CStdString &strFilename, CFileItem &item);
static bool FillFileItemList(const CVariant &parameterObject, CFileItemList &list);
View
2  xbmc/interfaces/json-rpc/JSONServiceDescription.cpp
@@ -199,6 +199,7 @@ JsonRpcMethodMap CJSONServiceDescription::m_methodMaps[] = {
{ "AudioLibrary.GetGenres", CAudioLibrary::GetGenres },
{ "AudioLibrary.Scan", CAudioLibrary::Scan },
{ "AudioLibrary.Export", CAudioLibrary::Export },
+ { "AudioLibrary.Clean", CAudioLibrary::Clean },
// Video Library
{ "VideoLibrary.GetGenres", CVideoLibrary::GetGenres },
@@ -218,6 +219,7 @@ JsonRpcMethodMap CJSONServiceDescription::m_methodMaps[] = {
{ "VideoLibrary.GetRecentlyAddedMusicVideos", CVideoLibrary::GetRecentlyAddedMusicVideos },
{ "VideoLibrary.Scan", CVideoLibrary::Scan },
{ "VideoLibrary.Export", CVideoLibrary::Export },
+ { "VideoLibrary.Clean", CVideoLibrary::Clean },
// System operations
{ "System.Shutdown", CSystemOperations::Shutdown },
View
16 xbmc/interfaces/json-rpc/ServiceDescription.h
@@ -1754,6 +1754,14 @@ namespace JSONRPC
"],"
"\"returns\": \"string\""
"}",
+ "\"AudioLibrary.Clean\": {"
+ "\"type\": \"method\","
+ "\"description\": \"Cleans the audio library from non-existent items\","
+ "\"transport\": \"Response\","
+ "\"permission\": \"ScanLibrary\","
+ "\"params\": [ ],"
+ "\"returns\": \"string\""
+ "}",
"\"VideoLibrary.GetMovies\": {"
"\"type\": \"method\","
"\"description\": \"Retrieve all movies\","
@@ -2056,6 +2064,14 @@ namespace JSONRPC
"],"
"\"returns\": \"string\""
"}",
+ "\"VideoLibrary.Clean\": {"
+ "\"type\": \"method\","
+ "\"description\": \"Cleans the video library from non-existent items\","
+ "\"transport\": \"Response\","
+ "\"permission\": \"ScanLibrary\","
+ "\"params\": [ ],"
+ "\"returns\": \"string\""
+ "}",
"\"System.Shutdown\": {"
"\"type\": \"method\","
"\"description\": \"Shuts the system running XBMC down\","
View
6 xbmc/interfaces/json-rpc/VideoLibrary.cpp
@@ -412,6 +412,12 @@ JSON_STATUS CVideoLibrary::Export(const CStdString &method, ITransportLayer *tra
return ACK;
}
+JSON_STATUS CVideoLibrary::Clean(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result)
+{
+ g_application.getApplicationMessenger().ExecBuiltIn("cleanlibrary(video)");
+ return ACK;
+}
+
bool CVideoLibrary::FillFileItem(const CStdString &strFilename, CFileItem &item)
{
CVideoDatabase videodatabase;
View
1  xbmc/interfaces/json-rpc/VideoLibrary.h
@@ -51,6 +51,7 @@ namespace JSONRPC
static JSON_STATUS Scan(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
static JSON_STATUS Export(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
+ static JSON_STATUS Clean(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result);
static bool FillFileItem(const CStdString &strFilename, CFileItem &item);
static bool FillFileItemList(const CVariant &parameterObject, CFileItemList &list);
View
16 xbmc/interfaces/json-rpc/methods.json
@@ -997,6 +997,14 @@
],
"returns": "string"
},
+ "AudioLibrary.Clean": {
+ "type": "method",
+ "description": "Cleans the audio library from non-existent items",
+ "transport": "Response",
+ "permission": "ScanLibrary",
+ "params": [ ],
+ "returns": "string"
+ },
"VideoLibrary.GetMovies": {
"type": "method",
"description": "Retrieve all movies",
@@ -1299,6 +1307,14 @@
],
"returns": "string"
},
+ "VideoLibrary.Clean": {
+ "type": "method",
+ "description": "Cleans the video library from non-existent items",
+ "transport": "Response",
+ "permission": "ScanLibrary",
+ "params": [ ],
+ "returns": "string"
+ },
"System.Shutdown": {
"type": "method",
"description": "Shuts the system running XBMC down",
Please sign in to comment.
Something went wrong with that request. Please try again.