mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
xbmc: service addons/systemd: also handle addon updates
This commit is contained in:
parent
97118de1ac
commit
cfa2cfbcdc
@ -1,13 +1,13 @@
|
||||
From ba7354da4a958e33928556a263e8b435da877689 Mon Sep 17 00:00:00 2001
|
||||
From 9c1dea43c9b9b66c48d057d3c0e44cd4a807e4dc Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Wed, 18 Dec 2013 21:32:31 +0200
|
||||
Date: Fri, 20 Dec 2013 00:36:34 +0200
|
||||
Subject: [PATCH] service addons: use a wrapper to setup systemd
|
||||
|
||||
---
|
||||
xbmc/addons/AddonDatabase.cpp | 3 +++
|
||||
xbmc/addons/AddonInstaller.cpp | 9 +++++++++
|
||||
xbmc/addons/AddonInstaller.h | 2 ++
|
||||
3 files changed, 14 insertions(+)
|
||||
xbmc/addons/AddonDatabase.cpp | 3 +++
|
||||
xbmc/addons/AddonInstaller.cpp | 10 ++++++++++
|
||||
xbmc/addons/AddonInstaller.h | 2 ++
|
||||
3 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/xbmc/addons/AddonDatabase.cpp b/xbmc/addons/AddonDatabase.cpp
|
||||
index 4202363..105749f 100644
|
||||
@ -38,7 +38,7 @@ index 4202363..105749f 100644
|
||||
if (service)
|
||||
service->Start();
|
||||
diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp
|
||||
index 8c9f241..0d80537 100644
|
||||
index 8c9f241..d2f4610 100644
|
||||
--- a/xbmc/addons/AddonInstaller.cpp
|
||||
+++ b/xbmc/addons/AddonInstaller.cpp
|
||||
@@ -70,6 +70,13 @@ CAddonInstaller &CAddonInstaller::Get()
|
||||
@ -55,7 +55,15 @@ index 8c9f241..0d80537 100644
|
||||
void CAddonInstaller::OnJobComplete(unsigned int jobID, bool success, CJob* job)
|
||||
{
|
||||
if (success)
|
||||
@@ -713,6 +720,7 @@ void CAddonInstallJob::OnPostInstall(bool reloadAddon)
|
||||
@@ -586,6 +593,7 @@ bool CAddonInstallJob::OnPreInstall()
|
||||
boost::shared_ptr<CService> service = boost::dynamic_pointer_cast<CService>(addon);
|
||||
if (service)
|
||||
service->Stop();
|
||||
+ CAddonInstaller::Get().CallOEWrapper(m_addon->ID(), true);
|
||||
CAddonMgr::Get().RemoveAddon(m_addon->ID()); // remove it
|
||||
return running;
|
||||
}
|
||||
@@ -713,6 +721,7 @@ void CAddonInstallJob::OnPostInstall(bool reloadAddon)
|
||||
AddonPtr addon;
|
||||
CAddonMgr::Get().GetAddon(m_addon->ID(), addon);
|
||||
boost::shared_ptr<CService> service = boost::dynamic_pointer_cast<CService>(addon);
|
||||
@ -63,7 +71,7 @@ index 8c9f241..0d80537 100644
|
||||
if (service)
|
||||
service->Start();
|
||||
}
|
||||
@@ -794,6 +802,7 @@ bool CAddonUnInstallJob::DoWork()
|
||||
@@ -794,6 +803,7 @@ bool CAddonUnInstallJob::DoWork()
|
||||
boost::shared_ptr<CService> service = boost::dynamic_pointer_cast<CService>(m_addon);
|
||||
if (service)
|
||||
service->Stop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user