diff options
author | Thomas Amland <thomas.amland@gmail.com> | 2017-02-12 17:05:06 +0100 |
---|---|---|
committer | Thomas Amland <thomas.amland@gmail.com> | 2017-02-12 17:17:08 +0100 |
commit | 401c96af13ce9fdb1d13883d2849047b2e834977 (patch) | |
tree | 56f0e9a019c14f1de9189f07bff5b282704611b6 | |
parent | 547eb786f7965d197100a7d5c611a6dd6729f452 (diff) |
[addons] auto-disable broken addons after update
-rw-r--r-- | addons/resource.language.en_gb/resources/strings.po | 5 | ||||
-rw-r--r-- | xbmc/addons/AddonInstaller.cpp | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 340731974a..6bb95862b4 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -14783,7 +14783,10 @@ msgctxt "#24093" msgid "Checking %s..." msgstr "" -#empty string with id 24094 +#: xbmc/addons/AddonInstaller.cpp +msgctxt "#24094" +msgid "Add-on disabled due to being marked broken in repository." +msgstr "" #: xbmc/addons/GUIDialogAddonInfo.cpp msgctxt "#24095" diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp index 59408c8800..55d300904d 100644 --- a/xbmc/addons/AddonInstaller.cpp +++ b/xbmc/addons/AddonInstaller.cpp @@ -631,6 +631,16 @@ bool CAddonInstallJob::DoWork() EventPtr(new CAddonManagementEvent(m_addon, m_isUpdate ? 24065 : 24064)), !IsModal() && CServiceBroker::GetSettings().GetBool(CSettings::SETTING_ADDONS_NOTIFICATIONS), false); + if (m_isAutoUpdate && !m_addon->Broken().empty()) + { + CLog::Log(LOGDEBUG, "CAddonInstallJob[%s]: auto-disabling due to being marked as broken", m_addon->ID().c_str()); + CAddonMgr::GetInstance().DisableAddon(m_addon->ID()); + CEventLog::GetInstance().Add( + EventPtr(new CAddonManagementEvent(m_addon, 24094)), + CServiceBroker::GetSettings().GetBool(CSettings::SETTING_ADDONS_NOTIFICATIONS), + false); + } + // and we're done! MarkFinished(); return true; |