From bacacda5d260f15a7e706ffa8049b0f3006f5428 Mon Sep 17 00:00:00 2001 From: fhemrocks <> Date: Wed, 9 Jul 2014 22:29:03 +0000 Subject: [PATCH] update to support coverart links git-svn-id: https://svn.fhem.de/fhem/trunk@6226 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/97_SB_SERVER.pm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/fhem/contrib/97_SB_SERVER.pm b/fhem/contrib/97_SB_SERVER.pm index 5099ecb29..549775fca 100644 --- a/fhem/contrib/97_SB_SERVER.pm +++ b/fhem/contrib/97_SB_SERVER.pm @@ -31,11 +31,6 @@ # CLIPORT the port for the CLI interface of the server # # ############################################################################ -# -# $Id$ -# -# ############################################################################ - package main; use strict; @@ -469,6 +464,7 @@ sub SB_SERVER_Set( $@ ) { } elsif( $cmd eq "statusRequest" ) { Log3( $hash, 5, "SB_SERVER_Set: statusRequest" ); + DevIo_SimpleWrite( $hash, "version ?\n", 0 ); DevIo_SimpleWrite( $hash, "serverstatus 0 200\n", 0 ); DevIo_SimpleWrite( $hash, "favorites items 0 " . AttrVal( $name, "maxfavorites", 100 ) . "\n", @@ -634,6 +630,9 @@ sub SB_SERVER_DoInit( $ ) { # and signal to our clients SB_SERVER_Broadcast( $hash, "SERVER", "OFF" ); + SB_SERVER_Broadcast( $hash, "SERVER", + "IP " . $hash->{IP} . + ":9000" ); } return( "" ); } @@ -649,6 +648,10 @@ sub SB_SERVER_DoInit( $ ) { AttrVal( $name, "maxfavorites", 100 ) . "\n", 0 ); DevIo_SimpleWrite( $hash, "playlists 0 200\n", 0 ); + SB_SERVER_Broadcast( $hash, "SERVER", + "IP " . $hash->{IP} . + ":9000" ); + # start the alive checking mechanism $hash->{ALIVECHECK} = "?"; InternalTimer( gettimeofday() + AttrVal( $name, "alivetimer", 120 ), @@ -720,6 +723,9 @@ sub SB_SERVER_ParseCmds( $$ ) { readingsSingleUpdate( $hash, "power", "on", 1 ); # signal our players SB_SERVER_Broadcast( $hash, "SERVER", "ON" ); + SB_SERVER_Broadcast( $hash, "SERVER", + "IP " . $hash->{IP} . + ":9000" ); } } elsif( $cmd eq "pref" ) {