Skip to content

Commit

Permalink
Change variable name in request to prevent conflict and stay compatib…
Browse files Browse the repository at this point in the history
…le with last 8.4.0 versions
  • Loading branch information
guillaumezin committed May 25, 2023
1 parent fdc485f commit 3c71196
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions Plugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ sub _filterDomoticz {

sub _getScenesFromDomoticzCallback {
my $http = shift;
my $request = $http->params('request');
my $request = $http->params('slimrequest');
my $client = $request->client();
my @devices;
my @menu;
Expand Down Expand Up @@ -651,7 +651,7 @@ sub _getScenesFromDomoticzCallback {
sub _getScenesFromDomoticzErrorCallback {
my $http = shift;
my $error = $http->error;
my $request = $http->params('request');
my $request = $http->params('slimrequest');

# Not sure what status to use here
$request->setStatusBadParams();
Expand All @@ -660,7 +660,7 @@ sub _getScenesFromDomoticzErrorCallback {

sub _getFromDomoticzCallback {
my $http = shift;
my $request = $http->params('request');
my $request = $http->params('slimrequest');
my $client = $request->client();
my @menu;
my $trendsurl = initPref($client) . 'type=scenes&used=true';
Expand All @@ -681,7 +681,7 @@ sub _getFromDomoticzCallback {
\&_getScenesFromDomoticzCallback,
\&_getScenesFromDomoticzErrorCallback,
{
request => $request,
slimrequest => $request,
devices => \@results,
cache => 0, # optional, cache result of HTTP request
}
Expand All @@ -693,7 +693,7 @@ sub _getFromDomoticzCallback {
sub _getFromDomoticzErrorCallback {
my $http = shift;
my $error = $http->error;
my $request = $http->params('request');
my $request = $http->params('slimrequest');

# Not sure what status to use here
$request->setStatusBadParams();
Expand All @@ -712,7 +712,7 @@ sub getFromDomoticz {
\&_getFromDomoticzCallback,
\&_getFromDomoticzErrorCallback,
{
request => $request,
slimrequest => $request,
cache => 0, # optional, cache result of HTTP request
}
);
Expand Down Expand Up @@ -842,7 +842,7 @@ sub _manageMacroStringQueue {
\&_getDevicesOnlyFromDomoticzCallback,
\&_getDevicesOnlyFromDomoticzErrorCallback,
{
request => $request,
slimrequest => $request,
cache => 0, # optional, cache result of HTTP request
}
);
Expand Down Expand Up @@ -994,7 +994,7 @@ sub _macroStringResult {

sub _getDevicesOnlyFromDomoticzCallback {
my $http = shift;
my $request = $http->params('request');
my $request = $http->params('slimrequest');
my $client = $request->client();

$log->debug('Got answer from Domoticz after get devices');
Expand All @@ -1013,7 +1013,7 @@ sub _getDevicesOnlyFromDomoticzCallback {

sub _getDevicesOnlyFromDomoticzErrorCallback {
my $http = shift;
my $request = $http->params('request');
my $request = $http->params('slimrequest');
my @results;

$log->error('No answer from Domoticz after get devices');
Expand Down
2 changes: 1 addition & 1 deletion install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
<minVersion>7.4.0</minVersion>
</targetApplication>
<type>2</type>
<version>1.2.0</version>
<version>1.2.1</version>
</extension>

0 comments on commit 3c71196

Please sign in to comment.