mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
kodi: update LE patches
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
10d5a15ce6
commit
c1bc92913b
@ -1,4 +1,4 @@
|
||||
From 3e1f7d098726e4af7eac9c83c70cf8196e4e9e3e Mon Sep 17 00:00:00 2001
|
||||
From 7336d7da9e863be6fac9b5cab5ffe441e658f15f Mon Sep 17 00:00:00 2001
|
||||
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||
Date: Wed, 5 Jul 2017 15:46:51 +0100
|
||||
Subject: [PATCH] make binary addons executable
|
||||
@ -10,9 +10,11 @@ credits to vpeter4 for the patch
|
||||
xbmc/addons/Addon.cpp | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp
|
||||
index 90669bb10e..f6aabfc615 100644
|
||||
--- a/xbmc/addons/Addon.cpp
|
||||
+++ b/xbmc/addons/Addon.cpp
|
||||
@@ -14,6 +14,10 @@
|
||||
@@ -29,6 +29,10 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@ -20,10 +22,10 @@ credits to vpeter4 for the patch
|
||||
+#include <dirent.h>
|
||||
+#include <sys/stat.h>
|
||||
+
|
||||
#include "AddonManager.h"
|
||||
#include "addons/settings/AddonSettings.h"
|
||||
#include "filesystem/Directory.h"
|
||||
@@ -390,6 +394,28 @@ void OnPreInstall(const AddonPtr& addon)
|
||||
#ifdef HAS_PYTHON
|
||||
#include "interfaces/python/XBPython.h"
|
||||
#endif
|
||||
@@ -663,6 +667,28 @@ void OnPreInstall(const AddonPtr& addon)
|
||||
|
||||
void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
|
||||
{
|
||||
@ -52,3 +54,6 @@ credits to vpeter4 for the patch
|
||||
addon->OnPostInstall(update, modal);
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
@ -1,12 +1,25 @@
|
||||
From 069f73ce808caaf57057304e261afc1b76b37ea3 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Reichl <hias@horus.com>
|
||||
Date: Thu, 20 Oct 2022 19:24:59 +0200
|
||||
Subject: [PATCH] Use a wrapper to setup service addons
|
||||
|
||||
---
|
||||
xbmc/addons/Addon.cpp | 35 +++++++++++++++++++++++++++++++++++
|
||||
xbmc/addons/Addon.h | 9 +++++++++
|
||||
xbmc/addons/AddonManager.cpp | 3 +++
|
||||
3 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp
|
||||
index f6aabfc615..496e1fcfa0 100644
|
||||
--- a/xbmc/addons/Addon.cpp
|
||||
+++ b/xbmc/addons/Addon.cpp
|
||||
@@ -385,6 +385,37 @@ AddonVersion CAddon::GetDependencyVersio
|
||||
@@ -658,6 +658,37 @@ CAddonVersion CAddon::GetDependencyVersion(const std::string& dependencyID) cons
|
||||
return m_addonInfo->DependencyVersion(dependencyID);
|
||||
}
|
||||
|
||||
+void LEAddonHook(const AddonPtr& addon, const LE_ADDON_CONTEXT context) {
|
||||
+
|
||||
+ if (addon->Type() == ADDON_SERVICE) {
|
||||
+ if (addon->Type() == AddonType::SERVICE) {
|
||||
+ std::string contextStr;
|
||||
+ char cmd[255];
|
||||
+
|
||||
@ -38,7 +51,7 @@
|
||||
void OnPreInstall(const AddonPtr& addon)
|
||||
{
|
||||
//Fallback to the pre-install callback in the addon.
|
||||
@@ -414,6 +445,8 @@ void OnPostInstall(const AddonPtr& addon
|
||||
@@ -687,6 +718,8 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
|
||||
}
|
||||
closedir(addonsDir);
|
||||
}
|
||||
@ -47,7 +60,7 @@
|
||||
// OE
|
||||
|
||||
addon->OnPostInstall(update, modal);
|
||||
@@ -421,6 +454,8 @@ void OnPostInstall(const AddonPtr& addon
|
||||
@@ -694,6 +727,8 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
|
||||
|
||||
void OnPreUnInstall(const AddonPtr& addon)
|
||||
{
|
||||
@ -56,11 +69,13 @@
|
||||
addon->OnPreUnInstall();
|
||||
}
|
||||
|
||||
diff --git a/xbmc/addons/Addon.h b/xbmc/addons/Addon.h
|
||||
index a09b8db80f..629f028584 100644
|
||||
--- a/xbmc/addons/Addon.h
|
||||
+++ b/xbmc/addons/Addon.h
|
||||
@@ -27,6 +27,15 @@ namespace ADDON
|
||||
void OnPreUnInstall(const AddonPtr& addon);
|
||||
void OnPostUnInstall(const AddonPtr& addon);
|
||||
@@ -31,6 +31,15 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal);
|
||||
void OnPreUnInstall(const AddonPtr& addon);
|
||||
void OnPostUnInstall(const AddonPtr& addon);
|
||||
|
||||
+typedef enum {
|
||||
+ LE_ADDON_ENABLED,
|
||||
@ -74,21 +89,34 @@
|
||||
class CAddon : public IAddon
|
||||
{
|
||||
public:
|
||||
diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp
|
||||
index bb0b510378..0524caa5a9 100644
|
||||
--- a/xbmc/addons/AddonManager.cpp
|
||||
+++ b/xbmc/addons/AddonManager.cpp
|
||||
@@ -840,6 +840,7 @@ bool CAddonMgr::DisableAddon(const std::
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "FileItem.h"
|
||||
#include "LangInfo.h"
|
||||
#include "ServiceBroker.h"
|
||||
+#include "addons/Addon.h"
|
||||
#include "addons/AddonBuilder.h"
|
||||
#include "addons/AddonDatabase.h"
|
||||
#include "addons/AddonEvents.h"
|
||||
@@ -863,6 +864,7 @@ bool CAddonMgr::DisableAddon(const std::string& id, AddonDisabledReason disabled
|
||||
AddonPtr addon;
|
||||
if (GetAddon(id, addon, ADDON_UNKNOWN, OnlyEnabled::CHOICE_NO) && addon != NULL)
|
||||
if (GetAddon(id, addon, AddonType::UNKNOWN, OnlyEnabled::CHOICE_NO) && addon != nullptr)
|
||||
{
|
||||
+ ADDON::LEAddonHook(addon, ADDON::LE_ADDON_DISABLED);
|
||||
auto eventLog = CServiceBroker::GetEventLog();
|
||||
if (eventLog)
|
||||
eventLog->Add(EventPtr(new CAddonManagementEvent(addon, 24141)));
|
||||
@@ -891,6 +892,7 @@ bool CAddonMgr::EnableSingle(const std::
|
||||
if (!m_database.EnableAddon(id))
|
||||
@@ -914,6 +916,7 @@ bool CAddonMgr::EnableSingle(const std::string& id)
|
||||
if (!m_database->EnableAddon(id))
|
||||
return false;
|
||||
m_disabled.erase(id);
|
||||
+ ADDON::LEAddonHook(addon, ADDON::LE_ADDON_ENABLED);
|
||||
|
||||
// If enabling a repo add-on without an origin, set its origin to its own id
|
||||
if (addon->HasType(ADDON_REPOSITORY) && addon->Origin().empty())
|
||||
if (addon->HasType(AddonType::REPOSITORY) && addon->Origin().empty())
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8c8803dc15ea7820f0f980bc12fcea2c7b8c4487 Mon Sep 17 00:00:00 2001
|
||||
From 76575164088a259d73c66dacb7df585b6a6e577a Mon Sep 17 00:00:00 2001
|
||||
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||
Date: Tue, 17 Dec 2019 15:51:23 +0000
|
||||
Subject: [PATCH] refresh /etc/environment on install and uninstall
|
||||
@ -7,25 +7,30 @@ Subject: [PATCH] refresh /etc/environment on install and uninstall
|
||||
xbmc/addons/Addon.cpp | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp
|
||||
index 496e1fcfa0..da0a5955e0 100644
|
||||
--- a/xbmc/addons/Addon.cpp
|
||||
+++ b/xbmc/addons/Addon.cpp
|
||||
@@ -450,6 +450,9 @@ void OnPostInstall(const AddonPtr& addon
|
||||
@@ -723,6 +723,9 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
|
||||
// OE
|
||||
|
||||
addon->OnPostInstall(update, modal);
|
||||
+
|
||||
+ if (addon->Type() == ADDON_SERVICE || addon->Type() == ADDON_SCRIPT)
|
||||
+ if (addon->Type() == AddonType::SERVICE || addon->Type() == AddonType::SCRIPT)
|
||||
+ system("/usr/bin/environment-setup");
|
||||
}
|
||||
|
||||
void OnPreUnInstall(const AddonPtr& addon)
|
||||
@@ -462,6 +465,9 @@ void OnPreUnInstall(const AddonPtr& addo
|
||||
@@ -735,6 +738,9 @@ void OnPreUnInstall(const AddonPtr& addon)
|
||||
void OnPostUnInstall(const AddonPtr& addon)
|
||||
{
|
||||
addon->OnPostUnInstall();
|
||||
+
|
||||
+ if (addon->Type() == ADDON_SERVICE || addon->Type() == ADDON_SCRIPT)
|
||||
+ if (addon->Type() == AddonType::SERVICE || addon->Type() == AddonType::SCRIPT)
|
||||
+ system("/usr/bin/environment-setup");
|
||||
}
|
||||
|
||||
} /* namespace ADDON */
|
||||
} // namespace ADDON
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user