mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #7028 from HiassofT/le11-kodi-2210.2
kodi: update to latest master
This commit is contained in:
commit
622b4d7cfe
@ -3,8 +3,8 @@
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="kodi"
|
||||
PKG_VERSION="3066d800934f39c28b951c69930d3cbee5fd6308"
|
||||
PKG_SHA256="926ec59ab5ad183041dae63cb940e04463fc00d25b5cb721817e105dae7e51de"
|
||||
PKG_VERSION="92a0283f169270dc205834b470c09c84e845dfc1"
|
||||
PKG_SHA256="51e2a51d98098662c138ffbcf8c08038e10f9b8b6b933b1a1180f3ec17950f96"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.kodi.tv"
|
||||
PKG_URL="https://github.com/xbmc/xbmc/archive/${PKG_VERSION}.tar.gz"
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a90ad221abf77aa38d34b52edf21a43f85aedac2 Mon Sep 17 00:00:00 2001
|
||||
From 3f4e5cd94c1ad7e9361f68f04dba23aec06e0e49 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 20 Oct 2019 17:10:07 +0000
|
||||
Subject: [PATCH 1/6] WIP: DVDVideoCodecDRMPRIME: add support for filters
|
||||
|
@ -1,18 +1,26 @@
|
||||
From 60c20b00749ddf3ffd8cbb7a3cd3778fb8af13fc Mon Sep 17 00:00:00 2001
|
||||
From a2f57bbd2c63fc0cf89304805e93f3b57ce55b58 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Thu, 26 Dec 2019 11:01:51 +0100
|
||||
Subject: [PATCH 2/6] WIP: DRMPRIME deinterlace filter
|
||||
|
||||
---
|
||||
.../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 378 +++++++++++++++---
|
||||
.../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 379 +++++++++++++++---
|
||||
.../DVDCodecs/Video/DVDVideoCodecDRMPRIME.h | 9 +-
|
||||
2 files changed, 327 insertions(+), 60 deletions(-)
|
||||
2 files changed, 328 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
index 40cde1ba6e..6588abec6d 100644
|
||||
index 40cde1ba6e..1843e72e55 100644
|
||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
@@ -79,12 +79,15 @@ CDVDVideoCodecDRMPRIME::CDVDVideoCodecDRMPRIME(CProcessInfo& processInfo)
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "threads/SingleLock.h"
|
||||
#include "utils/CPUInfo.h"
|
||||
#include "utils/log.h"
|
||||
+#include "utils/StringUtils.h"
|
||||
|
||||
#if defined(HAVE_GBM)
|
||||
#include "windowing/gbm/WinSystemGbm.h"
|
||||
@@ -79,12 +80,15 @@ CDVDVideoCodecDRMPRIME::CDVDVideoCodecDRMPRIME(CProcessInfo& processInfo)
|
||||
: CDVDVideoCodec(processInfo)
|
||||
{
|
||||
m_pFrame = av_frame_alloc();
|
||||
@ -28,7 +36,7 @@ index 40cde1ba6e..6588abec6d 100644
|
||||
avcodec_free_context(&m_pCodecContext);
|
||||
}
|
||||
|
||||
@@ -341,8 +344,19 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
|
||||
@@ -341,8 +345,19 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
|
||||
}
|
||||
|
||||
UpdateProcessInfo(m_pCodecContext, m_pCodecContext->pix_fmt);
|
||||
@ -49,7 +57,7 @@ index 40cde1ba6e..6588abec6d 100644
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -418,6 +432,8 @@ void CDVDVideoCodecDRMPRIME::Reset()
|
||||
@@ -418,6 +433,8 @@ void CDVDVideoCodecDRMPRIME::Reset()
|
||||
return;
|
||||
|
||||
Drain();
|
||||
@ -58,7 +66,7 @@ index 40cde1ba6e..6588abec6d 100644
|
||||
|
||||
do
|
||||
{
|
||||
@@ -465,7 +481,7 @@ void CDVDVideoCodecDRMPRIME::Drain()
|
||||
@@ -465,7 +482,7 @@ void CDVDVideoCodecDRMPRIME::Drain()
|
||||
av_packet_free(&avpkt);
|
||||
}
|
||||
|
||||
@ -67,7 +75,7 @@ index 40cde1ba6e..6588abec6d 100644
|
||||
{
|
||||
pVideoPicture->iWidth = m_pFrame->width;
|
||||
pVideoPicture->iHeight = m_pFrame->height;
|
||||
@@ -559,13 +575,238 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
|
||||
@@ -559,13 +576,238 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
|
||||
? DVD_NOPTS_VALUE
|
||||
: static_cast<double>(pts) * DVD_TIME_BASE / AV_TIME_BASE;
|
||||
pVideoPicture->dts = DVD_NOPTS_VALUE;
|
||||
@ -309,7 +317,7 @@ index 40cde1ba6e..6588abec6d 100644
|
||||
int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);
|
||||
if (ret < 0)
|
||||
{
|
||||
@@ -581,21 +822,14 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
|
||||
@@ -581,21 +823,14 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
|
||||
|
||||
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()
|
||||
{
|
||||
@ -335,7 +343,7 @@ index 40cde1ba6e..6588abec6d 100644
|
||||
}
|
||||
else if (ret)
|
||||
{
|
||||
@@ -606,71 +840,97 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()
|
||||
@@ -606,71 +841,97 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()
|
||||
return VC_ERROR;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d4956bedd865a007585fbd59a4b938854b61b47f Mon Sep 17 00:00:00 2001
|
||||
From c2b50468de1a8a72a4e00e53492e4e26f2573490 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Fri, 27 Aug 2021 20:29:50 +0100
|
||||
Subject: [PATCH 3/6] DVDVideoCodecDRMPRIME: Avoid exception with
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH 3/6] DVDVideoCodecDRMPRIME: Avoid exception with
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
index 6588abec6d..0084fcc441 100644
|
||||
index 1843e72e55..709311e75f 100644
|
||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
@@ -605,7 +605,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
|
||||
@@ -606,7 +606,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
|
||||
if (!pVideoPicture->videoBuffer)
|
||||
{
|
||||
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::{} - videoBuffer:nullptr format:{}", __FUNCTION__,
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b577b5358bc9e72550dbba9f12f27973639a8fca Mon Sep 17 00:00:00 2001
|
||||
From 66833bc8221a9d5a5fbc625c3f0293a261bbd412 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Fri, 17 Sep 2021 15:23:16 +0100
|
||||
Subject: [PATCH 4/6] DVDVideoCodecDRMPRIME: Leave deinterlace filter active on
|
||||
@ -14,10 +14,10 @@ be just copied by deinterlace filter
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
index 0084fcc441..26efaabe02 100644
|
||||
index 709311e75f..6ba0804904 100644
|
||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
@@ -855,6 +855,10 @@ std::string CDVDVideoCodecDRMPRIME::GetFilterChain(bool interlaced)
|
||||
@@ -856,6 +856,10 @@ std::string CDVDVideoCodecDRMPRIME::GetFilterChain(bool interlaced)
|
||||
if (!m_processInfo.Supports(mInt))
|
||||
mInt = m_processInfo.GetFallbackDeintMethod();
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 622f31900b9c11dca44e40b36d12bff5997da953 Mon Sep 17 00:00:00 2001
|
||||
From 6d40c431345c8bac66fb1a3bb06e29a0f944ac3d Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Tue, 30 Nov 2021 16:05:06 +0000
|
||||
Subject: [PATCH 5/6] SetVideoInterlaced: Set and unset deinterlace method name
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH 5/6] SetVideoInterlaced: Set and unset deinterlace method name
|
||||
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
index 26efaabe02..2ceb7ce02f 100644
|
||||
index 6ba0804904..9139233bc4 100644
|
||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
@@ -769,14 +769,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -770,14 +770,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ index 26efaabe02..2ceb7ce02f 100644
|
||||
|
||||
if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO))
|
||||
{
|
||||
@@ -794,6 +787,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -795,6 +788,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
|
||||
void CDVDVideoCodecDRMPRIME::FilterClose()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
From be317b043f9308b76b15325fa670802bc969533a Mon Sep 17 00:00:00 2001
|
||||
From e014499333c6ca6ef4dca3a15b8c81ec07d80c12 Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <popcornmix@gmail.com>
|
||||
Date: Wed, 24 Nov 2021 20:21:28 +0000
|
||||
Subject: [PATCH 6/6] DVDVideoCodecDRMPRIME: Close deinterlace filter on error
|
||||
@ -9,10 +9,10 @@ Otherwise we crash later with an invalid m_pFilterGraph pointer
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
index 2ceb7ce02f..20a5c24f53 100644
|
||||
index 9139233bc4..0b44d90f13 100644
|
||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
|
||||
@@ -685,6 +685,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -686,6 +686,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
CLog::Log(LOGERROR,
|
||||
"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})",
|
||||
err, result);
|
||||
@ -20,7 +20,7 @@ index 2ceb7ce02f..20a5c24f53 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -692,6 +693,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -693,6 +694,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
if (!par)
|
||||
{
|
||||
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc");
|
||||
@ -28,7 +28,7 @@ index 2ceb7ce02f..20a5c24f53 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -707,6 +709,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -708,6 +710,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
CLog::Log(LOGERROR,
|
||||
"CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set: {} ({})",
|
||||
err, result);
|
||||
@ -36,7 +36,7 @@ index 2ceb7ce02f..20a5c24f53 100644
|
||||
return false;
|
||||
}
|
||||
av_freep(&par);
|
||||
@@ -720,6 +723,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -721,6 +724,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
CLog::Log(LOGERROR,
|
||||
"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})",
|
||||
err, result);
|
||||
@ -44,7 +44,7 @@ index 2ceb7ce02f..20a5c24f53 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -728,6 +732,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -729,6 +733,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
if (result < 0)
|
||||
{
|
||||
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats");
|
||||
@ -52,7 +52,7 @@ index 2ceb7ce02f..20a5c24f53 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -751,6 +756,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -752,6 +757,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
if (result < 0)
|
||||
{
|
||||
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_parse");
|
||||
@ -60,7 +60,7 @@ index 2ceb7ce02f..20a5c24f53 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -760,6 +766,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
@@ -761,6 +767,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
|
||||
av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);
|
||||
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})",
|
||||
err, result);
|
||||
|
@ -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,9 +69,11 @@
|
||||
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
|
||||
@@ -31,6 +31,15 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal);
|
||||
void OnPreUnInstall(const AddonPtr& addon);
|
||||
void OnPostUnInstall(const AddonPtr& addon);
|
||||
|
||||
@ -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