public int Run() { try { // Create the Settings object //this.Settings = new KodiAddonSettings(); // If we have routes, invoke the request handler if (RouteManager.Routes.Count > 0) { RouteManager.HandleRequest(this.BaseUrl + this.Parameters); } int result = this.PluginMain(); return(result); } catch (Exception ex) { // This takes the exception and stores it, not allowing it to bubble up KodiBridge.SaveException(ex); return(1); } finally { /* * When we get here, we have already returned from PluginMain * tell Python that we are done (TODO: Wait for threads here) * */ KodiBridge.StopRPC(); } }
public int Run() { try { // Create the Settings object //this.Settings = new KodiAddonSettings(); // If we have routes, invoke the request handler if (RouteManager.Routes.Count > 0) { RouteManager.HandleRequest(this.BaseUrl + this.Parameters); } int result = this.PluginMain(); return(result); } catch (Exception ex) { // This takes the exception and stores it, not allowing it to bubble up KodiBridge.SaveException(ex); return(1); } }