diff options
author | Alasdair Campbell <alcoheca@gmail.com> | 2012-10-09 03:19:17 +0100 |
---|---|---|
committer | Alasdair Campbell <alcoheca@gmail.com> | 2012-10-11 11:20:18 +0100 |
commit | 7e139d57983add79a07b1ed369ee5525ad33ba28 (patch) | |
tree | bc86b34bb5101458f36fbb26c9431547424a1662 | |
parent | 5fd21b3a7f4a1d3e72adba80f620affb948cd9f4 (diff) |
[UPnP] allow users to disable informing clients of updates
-rw-r--r-- | language/English/strings.po | 4 | ||||
-rw-r--r-- | xbmc/network/upnp/UPnPServer.cpp | 3 | ||||
-rw-r--r-- | xbmc/settings/GUISettings.cpp | 1 | ||||
-rw-r--r-- | xbmc/settings/GUIWindowSettingsCategory.cpp | 5 |
4 files changed, 11 insertions, 2 deletions
diff --git a/language/English/strings.po b/language/English/strings.po index fb5abf8327..73e6ee906e 100644 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -8215,7 +8215,9 @@ msgctxt "#20187" msgid "UPnP" msgstr "" -#empty string with id 20188 +msgctxt "#20188" +msgid "Announce library updates via UPnP" +msgstr "" msgctxt "#20189" msgid "Enable auto scrolling for plot & review" diff --git a/xbmc/network/upnp/UPnPServer.cpp b/xbmc/network/upnp/UPnPServer.cpp index a411c192f5..0484d4e364 100644 --- a/xbmc/network/upnp/UPnPServer.cpp +++ b/xbmc/network/upnp/UPnPServer.cpp @@ -10,6 +10,7 @@ #include "filesystem/VideoDatabaseDirectory.h" #include "guilib/Key.h" #include "music/tags/MusicInfoTag.h" +#include "settings/GUISettings.h" #include "utils/log.h" #include "utils/md5.h" #include "utils/StringUtils.h" @@ -129,7 +130,7 @@ CUPnPServer::PropagateUpdates() string buffer; map<string,pair<bool, unsigned long> >::iterator itr; - if (m_scanning) + if (m_scanning || !g_guiSettings.GetBool("services.upnpannounce")) return; NPT_CHECK_LABEL(FindServiceById("urn:upnp-org:serviceId:ContentDirectory", service), failed); diff --git a/xbmc/settings/GUISettings.cpp b/xbmc/settings/GUISettings.cpp index 6f919ae68f..86cc9b8e4f 100644 --- a/xbmc/settings/GUISettings.cpp +++ b/xbmc/settings/GUISettings.cpp @@ -829,6 +829,7 @@ void CGUISettings::Initialize() CSettingsCategory* srvUpnp = AddCategory(SETTINGS_SERVICE, "upnp", 20187); AddBool(srvUpnp, "services.upnpserver", 21360, false); + AddBool(srvUpnp, "services.upnpannounce", 20188, true); AddBool(srvUpnp, "services.upnprenderer", 21881, false); #ifdef HAS_WEB_SERVER diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp index c5f2f7a30e..3e9a3f6fd3 100644 --- a/xbmc/settings/GUIWindowSettingsCategory.cpp +++ b/xbmc/settings/GUIWindowSettingsCategory.cpp @@ -737,6 +737,11 @@ void CGUIWindowSettingsCategory::UpdateSettings() CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); if (pControl) pControl->SetEnabled(g_guiSettings.GetBool("services.esenabled")); } + else if (strSetting.Equals("services.upnpannounce")) + { + CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); + pControl->SetEnabled(g_guiSettings.GetBool("services.upnpserver")); + } else if (strSetting.Equals("audiocds.quality")) { // only visible if we are doing non-WAV ripping CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); |