From c14e0e414ad17f009c860c873a18a974c5e70336 Mon Sep 17 00:00:00 2001 From: amet Date: Thu, 16 Jun 2011 02:07:30 +0400 Subject: [PATCH] [fix] recently added window was not updating after 28743c1647d6cdef84fec18d0e9ee6537aae7163 --- xbmc/windows/GUIWindowHome.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/xbmc/windows/GUIWindowHome.cpp b/xbmc/windows/GUIWindowHome.cpp index 27d2d4ba79672..1121516989c82 100644 --- a/xbmc/windows/GUIWindowHome.cpp +++ b/xbmc/windows/GUIWindowHome.cpp @@ -26,6 +26,7 @@ #include "interfaces/AnnouncementManager.h" #include "utils/log.h" #include "settings/AdvancedSettings.h" +#include "utils/Variant.h" using namespace ANNOUNCEMENT; @@ -61,21 +62,21 @@ void CGUIWindowHome::Announce(EAnnouncementFlag flag, const char *sender, const if (flag & VideoLibrary) { - if ((strcmp(message, "UpdateVideo") == 0) || - (strcmp(message, "RemoveVideo") == 0)) - ra_flag |= (Video | Totals); - - if (strcmp(message, "NewPlayCount") == 0) - ra_flag |= Totals; + if ((strcmp(message, "OnUpdate") == 0) || + (strcmp(message, "OnRemove") == 0)) + if (data.isMember("playcount")) + ra_flag |= Totals; + else + ra_flag |= (Video | Totals); } else if (flag & AudioLibrary) { - if ((strcmp(message, "UpdateAudio") == 0) || - (strcmp(message, "RemoveAudio") == 0)) - ra_flag |= ( Audio | Totals ); - - if (strcmp(message, "NewPlayCount") == 0) - ra_flag |= Totals; + if ((strcmp(message, "OnUpdate") == 0) || + (strcmp(message, "OnRemove") == 0)) + if (data.isMember("playcount")) + ra_flag |= Totals; + else + ra_flag |= ( Audio | Totals ); } // add the job immediatedly if the home window is active