mherger wrote: 
> 
> While you're at it: make sure you replace any LWP call with an async 
> call to prevent the plugin from blocking the process. That's something I
> 
> wanted to do for the MIP plugin a long time ago...

I assume you are referring to this section of code:


Code:
--------------------
    
  ...
  my $response = _syncHTTPRequest("/api/mix?$mixArgs\&$argString");
  ...
  
  sub _syncHTTPRequest {
  my $url = shift;
  $MIPPort = $prefs->get('port') unless $MIPPort;
  my $http = LWP::UserAgent->new;
  $http->timeout($prefs->get('timeout') || 5);
  return $http->get("http://localhost:$MIPPort$url";);
  }
  
--------------------


What would the equivalent be? I'm no Perl expert, and reading existing
code is not always that easy...

(Sorry for taking this thread off-topic...)



*Material debug:* 1. Launch via http: //SERVER:9000/material/?debug=json
2. Open browser's developer tools 3. Open console tab in developer tools
4. REQ/RESP messages sent to/from LMS will be logged here.
------------------------------------------------------------------------
cpd73's Profile: http://forums.slimdevices.com/member.php?userid=66686
View this thread: http://forums.slimdevices.com/showthread.php?t=112693

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to