kodi: service addons: move sysdemd wrapper back to OnEnabled/OnDisabled

I dont remember why I forced reinstall of units / restart addons on kodi
start, but it's not an issue anymore, so avoid restarting services.

NOTE: it is now required to disable/enable once all OE specific
service addons (tvheadend, vdr etc) once after upgrade. so dont pick
this for oe-stable.
This commit is contained in:
Stefan Saraev 2015-01-31 18:40:51 +02:00
parent 41a616e906
commit 85dee53e91

View File

@ -1,7 +1,7 @@
From 5d2b9a1d40720c8cc3306e7dab4e850271a1f00e Mon Sep 17 00:00:00 2001
From 6746387ee5681508c40a8d02747f9c1f3a7cdbc2 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Fri, 8 Aug 2014 18:22:44 +0300
Subject: [PATCH] service addons: use a wrapper to setup systemd
Subject: [PATCH] use a wrapper to setup systemd services
---
xbmc/addons/Service.cpp | 12 ++++++++++++
@ -9,29 +9,18 @@ Subject: [PATCH] service addons: use a wrapper to setup systemd
2 files changed, 15 insertions(+)
diff --git a/xbmc/addons/Service.cpp b/xbmc/addons/Service.cpp
index c406b11..c23b18a 100644
index c406b11..808f498 100644
--- a/xbmc/addons/Service.cpp
+++ b/xbmc/addons/Service.cpp
@@ -53,6 +53,9 @@ AddonPtr CService::Clone() const
@@ -53,6 +53,7 @@ AddonPtr CService::Clone() const
bool CService::Start()
{
bool ret = true;
+
+ CallOEWrapper(ID(), false);
+
switch (m_type)
{
#ifdef HAS_PYTHON
@@ -88,6 +91,8 @@ bool CService::Stop()
break;
}
+ CallOEWrapper(ID(), true);
+
return ret;
}
@@ -113,6 +118,13 @@ void CService::BuildServiceType()
@@ -113,13 +114,24 @@ void CService::BuildServiceType()
}
}
@ -44,7 +33,18 @@ index c406b11..c23b18a 100644
+
void CService::OnDisabled()
{
+ CallOEWrapper(ID(), true);
+
Stop();
}
void CService::OnEnabled()
{
+ CallOEWrapper(ID(), false);
+
Start();
}
diff --git a/xbmc/addons/Service.h b/xbmc/addons/Service.h
index 98ec8b6..36e4109 100644
--- a/xbmc/addons/Service.h
@ -60,5 +60,5 @@ index 98ec8b6..36e4109 100644
virtual void OnEnabled();
virtual bool OnPreInstall();
--
1.9.1
2.1.0