1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-13 04:21:51 +02:00

Add JS debug spam, to be removed later

This commit is contained in:
Dominik Schmidt 2014-12-10 19:34:31 +01:00
parent fa832e3a36
commit fbc547f882

View File

@ -604,10 +604,20 @@ Tomahawk.PluginManager = {
registerPlugin: function (type, object) {
this.objects[this.identifyObject(object)] = object;
Tomahawk.log("registerPlugin: " + type + " id: " + object.id);
Tomahawk.registerScriptPlugin(type, object.id);
},
invoke: function (requestId, objectId, methodName, params ) {
Tomahawk.log("requestId: " + requestId + " objectId: " + objectId + " methodName: " + methodName + " params: " + params);
if (!this.objects[objectId]) {
Tomahawk.log("Object not found!");
} else {
if (!this.objects[objectId][methodName]) {
Tomahawk.log("Function not found!");
}
}
Promise.resolve(this.objects[objectId][methodName](params)).then(function (result) {
if (typeof result === 'object') {
Tomahawk.reportScriptJobResults({