2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

37_plex.pm: make sure httpPort ist set before smapiRegister

git-svn-id: https://svn.fhem.de/fhem/trunk@11519 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2016-05-25 20:15:40 +00:00
parent e0821b1dfb
commit 37955aa61a

View File

@ -890,6 +890,7 @@ plex_Set($$@)
return undef;
} elsif( $cmd eq 'smapiRegister' ) {
return "first use the httpPort to configure a fixed http port" if( !AttrVal($name, 'httpPort', 0) );
return plex_publishToSonos($name, 'PLEX', $params[0]);
}
@ -1676,6 +1677,10 @@ plex_Attr($$$)
plex_startTimelineListener($hash);
}
} elsif( $attrName eq 'httpPort' ) {
plex_stopTimelineListener($hash);
plex_startTimelineListener($hash);
} elsif( $attrName eq 'responder' ) {
if( $cmd eq "set" && $attrVal ) {
$attr{$name}{$attrName} = 1;