Permalink
Browse files

[pvr] stop the pvr manager before uninstalling a pvr add-on and resta…

…rt it afterwards (if enabled)
  • Loading branch information...
opdenkamp committed Dec 31, 2012
1 parent a38d8aa commit 9a01facdc85b9e2337e264df98d2a0a85ebd7306
Showing with 12 additions and 0 deletions.
  1. +12 −0 xbmc/addons/AddonInstaller.cpp
@@ -741,6 +741,12 @@ CAddonUnInstallJob::CAddonUnInstallJob(const AddonPtr &addon)
bool CAddonUnInstallJob::DoWork()
{
+ if (m_addon->Type() == ADDON_PVRDLL)
+ {
+ // stop the pvr manager, so running pvr add-ons are stopped and closed
+ PVR::CPVRManager::Get().Stop();
+ }
+
if (!CAddonInstallJob::DeleteAddon(m_addon->Path()))
return false;
@@ -772,4 +778,10 @@ void CAddonUnInstallJob::OnPostUnInstall()
if (bSave)
CFavourites::Save(items);
+
+ if (m_addon->Type() == ADDON_PVRDLL)
+ {
+ if (g_guiSettings.GetBool("pvrmanager.enabled"))
+ PVR::CPVRManager::Get().Start(true);
+ }
}

0 comments on commit 9a01fac

Please sign in to comment.