summaryrefslogtreecommitdiffstats
path: root/lib/class/xmlrpcserver.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/xmlrpcserver.class.php')
-rw-r--r--lib/class/xmlrpcserver.class.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/class/xmlrpcserver.class.php b/lib/class/xmlrpcserver.class.php
index ae1d1653..3cdd7907 100644
--- a/lib/class/xmlrpcserver.class.php
+++ b/lib/class/xmlrpcserver.class.php
@@ -192,6 +192,25 @@ class xmlRpcServer {
} // create_stream_session
/**
+ * check_song
+ * This checks remote catalog
+ */
+ public static function check_song($xmlrpc_object) {
+
+ $var = $xmlrpc_object->params['0']->me['int'];
+ $sql = "SELECT `song`.`id` FROM `song` WHERE `id`='" . $var ."'";
+ $db_results = Dba::read($sql);
+ if(Dba::num_rows($db_results) == '0') {
+ $return = 0;
+ } else {
+ $return = 1;
+ }
+
+ return new XML_RPC_Response(XML_RPC_encode($return));
+
+ }
+
+ /**
* handshake
* This should be run before any other XMLRPC actions, it checks the KEY encoded with a timestamp then returns a valid TOKEN to be
* used in all further communication