mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
82_LGTV_WebOS: fix litte typos fix eval bug
git-svn-id: https://svn.fhem.de/fhem/trunk@16413 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bf903da4c0
commit
06aab49e6a
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 82_LGTV_WebOS: fix litte typos fix eval bug
|
||||||
- update: 21_HEOS: fix Use of uninitialized value {repeat}
|
- update: 21_HEOS: fix Use of uninitialized value {repeat}
|
||||||
in substitution (s///)
|
in substitution (s///)
|
||||||
- change: 88_xs1Bridge: Typ timerswitch added
|
- change: 88_xs1Bridge: Typ timerswitch added
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Developed with Kate
|
# Developed with Kate
|
||||||
#
|
#
|
||||||
# (c) 2017 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
|
# (c) 2017-2018 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
#
|
#
|
||||||
# Special thanks goes to comitters:
|
# Special thanks goes to comitters:
|
||||||
@ -53,21 +53,23 @@
|
|||||||
|
|
||||||
package main;
|
package main;
|
||||||
|
|
||||||
|
my $missingModul = "";
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use MIME::Base64;
|
eval "use MIME::Base64;1" or $missingModul .= "MIME::Base64 ";
|
||||||
use IO::Socket::INET;
|
eval "use IO::Socket::INET;1" or $missingModul .= "IO::Socket::INET ";
|
||||||
use Digest::SHA qw(sha1_hex);
|
eval "use Digest::SHA qw(sha1_hex);1" or $missingModul .= "Digest::SHA ";
|
||||||
use JSON qw(decode_json encode_json);
|
eval "use JSON qw(decode_json encode_json);1" or $missingModul .= "JSON ";
|
||||||
use Encode qw(encode_utf8 decode_utf8);
|
eval "use Encode qw(encode_utf8 decode_utf8);1" or $missingModul .= "Encode ";
|
||||||
use Blocking;
|
eval "use Blocking;1" or $missingModul .= "Blocking ";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my $version = "2.0.0";
|
my $version = "2.0.3";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -151,6 +153,7 @@ my %openApps = (
|
|||||||
|
|
||||||
'Maxdome' => 'maxdome',
|
'Maxdome' => 'maxdome',
|
||||||
'AmazonVideo' => 'lovefilm.de',
|
'AmazonVideo' => 'lovefilm.de',
|
||||||
|
'AmazonVid' => 'amazon',
|
||||||
'YouTube' => 'youtube.leanback.v4',
|
'YouTube' => 'youtube.leanback.v4',
|
||||||
'Netflix' => 'netflix',
|
'Netflix' => 'netflix',
|
||||||
'TV' => 'com.webos.app.livetv',
|
'TV' => 'com.webos.app.livetv',
|
||||||
@ -174,6 +177,7 @@ my %openAppsPackageName = (
|
|||||||
|
|
||||||
'maxdome' => 'Maxdome',
|
'maxdome' => 'Maxdome',
|
||||||
'lovefilm.de' => 'AmazonVideo',
|
'lovefilm.de' => 'AmazonVideo',
|
||||||
|
'amazon' => 'AmazonVid',
|
||||||
'youtube.leanback.v4' => 'YouTube',
|
'youtube.leanback.v4' => 'YouTube',
|
||||||
'netflix' => 'Netflix',
|
'netflix' => 'Netflix',
|
||||||
'com.webos.app.livetv' => 'TV',
|
'com.webos.app.livetv' => 'TV',
|
||||||
@ -233,6 +237,7 @@ sub LGTV_WebOS_Define($$) {
|
|||||||
|
|
||||||
|
|
||||||
return "too few parameters: define <name> LGTV_WebOS <HOST>" if( @a != 3 );
|
return "too few parameters: define <name> LGTV_WebOS <HOST>" if( @a != 3 );
|
||||||
|
return "Cannot define LGTV_WebOS device. Perl modul ${missingModul}is missing." if ( $missingModul );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -816,7 +821,7 @@ sub LGTV_WebOS_ResponseProcessing($$) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $decode_json = decode_json(encode_utf8($json));
|
my $decode_json = eval{decode_json(encode_utf8($json))};
|
||||||
if($@){
|
if($@){
|
||||||
Log3 $name, 3, "LGTV_WebOS ($name) - JSON error while request: $@";
|
Log3 $name, 3, "LGTV_WebOS ($name) - JSON error while request: $@";
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user