From cd662e17cae75aedd5351a8182180667d4f40deb Mon Sep 17 00:00:00 2001 From: vbs2 Date: Mon, 29 Feb 2016 19:58:19 +0000 Subject: [PATCH] 70_XBMC: fixed too frequent updates after stops git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@10966 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/70_XBMC.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/70_XBMC.pm b/fhem/FHEM/70_XBMC.pm index 3d3b4c423..08a710d00 100644 --- a/fhem/FHEM/70_XBMC.pm +++ b/fhem/FHEM/70_XBMC.pm @@ -243,6 +243,7 @@ sub XBMC_QueueIntervalUpdate($;$) { if (!defined($time)) { $time = AttrVal($hash->{NAME},'updateInterval',60); } + RemoveInternalTimer($hash); InternalTimer(time() + $time, "XBMC_Check", $hash, 0); } @@ -596,7 +597,7 @@ sub XBMC_ProcessNotification($$) #HACK: We want to fetch GUI.Properties here to update for example stereoscopicmode. # When doing this here we still get the in-movie stereo mode. So we define a timer # to invoke the update in some (tm) seconds - InternalTimer(time() + 2, "XBMC_Check", $hash, 0); + XBMC_QueueIntervalUpdate($hash, 2); } elsif($obj->{method} eq "Player.OnPause") { readingsSingleUpdate($hash,"playStatus",'paused',1);