aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvdrfan <vdrfan-nospam-@xbmc.org>2012-01-06 15:11:30 +0100
committervdrfan <vdrfan-nospam-@xbmc.org>2012-01-06 15:11:30 +0100
commit7936a07f7eb2cf86924c1e1bab1d137940290879 (patch)
treebc13e737428bbf26596efe3231c23dbf7d1ce2e1
parentc3ad7bb8c5ead60ab56f295c65f1568b36362a38 (diff)
changed: remove previously added favourites on addon uninstall (closes #12420)
-rw-r--r--xbmc/addons/AddonInstaller.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp
index e2372c6e06..5075f35600 100644
--- a/xbmc/addons/AddonInstaller.cpp
+++ b/xbmc/addons/AddonInstaller.cpp
@@ -29,6 +29,7 @@
#include "settings/GUISettings.h"
#include "settings/Settings.h"
#include "Application.h"
+#include "Favourites.h"
#include "utils/JobManager.h"
#include "dialogs/GUIDialogYesNo.h"
#include "addons/AddonManager.h"
@@ -604,4 +605,13 @@ void CAddonUnInstallJob::OnPostUnInstall()
database.Open();
database.DeleteRepository(m_addon->ID());
}
+
+ CFileItemList items;
+ CFavourites::Load(items);
+ for (int i=0; i < items.Size(); ++i)
+ {
+ if (items[i]->GetPath().Find(m_addon->ID()) > -1)
+ items.Remove(items[i].get());
+ }
+ CFavourites::Save(items);
}