Skip to content

Commit

Permalink
[package] [mediacenter-osmc] Rebase 'all' series for Krypton
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
  • Loading branch information
samnazarko committed Aug 28, 2016
1 parent 76ff033 commit 1e200f4
Show file tree
Hide file tree
Showing 20 changed files with 311 additions and 382 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From c548fb0b5f63ee038c441a7530622aa96b9b756c Mon Sep 17 00:00:00 2001
From b86ffbf6b3bcbb4f6e16225cae962dd8f986e3eb Mon Sep 17 00:00:00 2001
From: Sam Nazarko <email@samnazarko.co.uk>
Date: Tue, 2 Jun 2015 17:58:16 +0100
Subject: [PATCH] Always ensure the Web Server is enabled by default and do not
Expand All @@ -10,19 +10,19 @@ Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index d1a8e1c..697c83d 100644
index ca912cd..3a0c864 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2145,7 +2145,7 @@
<group id="1">
@@ -1715,7 +1715,7 @@
<requirement>HAS_WEB_SERVER</requirement>
<setting id="services.webserver" type="boolean" label="263" help="36328">
<level>1</level>
- <default>false</default>
+ <default>true</default>
<control type="toggle" />
</setting>
<setting id="services.webserverport" type="integer" parent="services.webserver" label="730" help="36329">
@@ -2160,7 +2160,7 @@
@@ -1733,7 +1733,7 @@
</setting>
<setting id="services.webserverusername" type="string" parent="services.webserver" label="1048" help="36330">
<level>1</level>
Expand All @@ -32,5 +32,5 @@ index d1a8e1c..697c83d 100644
<allowempty>true</allowempty>
</constraints>
--
2.1.0
2.7.4

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 3d61cddb68a362d4fe320dc6697a7cb8d91748e3 Mon Sep 17 00:00:00 2001
From c531d5fe3b354b21b6f71d4f114533a726393984 Mon Sep 17 00:00:00 2001
From: Sam Nazarko <email@samnazarko.co.uk>
Date: Sun, 13 Dec 2015 18:19:06 +0000
Subject: [PATCH] Sometimes the shutdown or reboot process can hang:
Expand All @@ -14,10 +14,10 @@ Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 91a9060..4c8bf1d 100644
index b3d5c77..137bed7 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2497,8 +2497,9 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
@@ -2402,8 +2402,9 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
switch (pMsg->dwMessage)
{
case TMSG_POWERDOWN:
Expand All @@ -28,7 +28,7 @@ index 91a9060..4c8bf1d 100644
break;

case TMSG_QUIT:
@@ -2523,8 +2524,9 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
@@ -2428,8 +2429,9 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)

case TMSG_RESTART:
case TMSG_RESET:
Expand All @@ -40,21 +40,21 @@ index 91a9060..4c8bf1d 100644

case TMSG_RESTARTAPP:
diff --git a/xbmc/Application.h b/xbmc/Application.h
index 616bfd5..cd52a73 100644
index c14f62d..22a6026 100644
--- a/xbmc/Application.h
+++ b/xbmc/Application.h
@@ -390,6 +390,11 @@ public:
*/
void UnregisterActionListener(IActionListener *listener);
@@ -395,6 +395,11 @@ public:

std::unique_ptr<CServiceManager> m_ServiceManager;

+ /*! \Allow OSMC's sigterm handler to know when to do the business or not, otherwise we get code on EXIT and POWERDOWN/REBOOT paths
+ */
+ bool m_ShuttingDown;
+ bool isShuttingDown() { return m_ShuttingDown; }
+
protected:
virtual bool OnSettingsSaving() const override;

/*!
\brief Locks calls from outside kodi (e.g. python) until framemove is processed.
*/
--
2.1.0
2.7.4

32 changes: 11 additions & 21 deletions package/mediacenter-osmc/patches/all-015-Add-sigterm-handler.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From e497740c6e0bfaa342f597efa41464f12e0b2679 Mon Sep 17 00:00:00 2001
From 550115412955f6757bb11f05031cb13b636ac545 Mon Sep 17 00:00:00 2001
From: Sam Nazarko <email@samnazarko.co.uk>
Date: Mon, 21 Dec 2015 04:32:14 +0000
Subject: [PATCH] Add sigterm handler. Send a Quit signal if we're not shutting
Expand All @@ -8,17 +8,17 @@ Subject: [PATCH] Add sigterm handler. Send a Quit signal if we're not shutting

Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
---
xbmc/main/main.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
xbmc/platform/posix/main.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/xbmc/main/main.cpp b/xbmc/main/main.cpp
index 01027f8..aa098d2 100644
--- a/xbmc/main/main.cpp
+++ b/xbmc/main/main.cpp
@@ -41,12 +41,28 @@
#include "input/linux/LIRC.h"
diff --git a/xbmc/platform/posix/main.cpp b/xbmc/platform/posix/main.cpp
index b6b7035..ce2a211 100644
--- a/xbmc/platform/posix/main.cpp
+++ b/xbmc/platform/posix/main.cpp
@@ -42,6 +42,18 @@
#endif
#include "XbmcContext.h"
#include "platform/XbmcContext.h"

+#include "Application.h"
+#include "messaging/ApplicationMessenger.h"
+
Expand All @@ -31,19 +31,9 @@ index 01027f8..aa098d2 100644
+ CApplicationMessenger::GetInstance().PostMsg(TMSG_QUIT);
+}
+

#ifdef __cplusplus
extern "C"
#endif
int main(int argc, char* argv[])
{
+ struct sigaction action;
+ memset(&action, 0, sizeof(struct sigaction));
+ action.sa_handler = sigterm_handler;
+ sigaction(SIGTERM, &action, NULL);
// set up some xbmc specific relationships
XBMC::Context context;

--
2.1.0
2.7.4

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 6f2ce7154081c59d04bdf341de23a88a4999d19e Mon Sep 17 00:00:00 2001
From 1045ef11e4dbd99bf56669ef7031099a25d978ca Mon Sep 17 00:00:00 2001
From: Sam Nazarko <email@samnazarko.co.uk>
Date: Tue, 2 Jun 2015 18:19:39 +0100
Subject: [PATCH] Enable AirPlay by default
Expand All @@ -9,11 +9,11 @@ Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index dcdf0bd..e2ab138 100644
index 3a0c864..84666e2 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2305,7 +2305,7 @@
<group id="1">
@@ -1907,7 +1907,7 @@
<group id="1" label="16000">
<setting id="services.airplay" type="boolean" label="1270" help="36343">
<level>1</level>
- <default>false</default>
Expand All @@ -22,5 +22,5 @@ index dcdf0bd..e2ab138 100644
</setting>
<setting id="services.airplayvolumecontrol" type="boolean" parent="services.airplay" label="1269" help="36541">
--
2.1.0
2.7.4

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
From 5380fb92c9c261d5d2ea8e977fb736bf549ebf0e Mon Sep 17 00:00:00 2001
From 12f19922c851caeae605cd01092c82e74bd3fccb Mon Sep 17 00:00:00 2001
From: Sam Nazarko <email@samnazarko.co.uk>
Date: Tue, 2 Jun 2015 18:22:04 +0100
Subject: [PATCH] Allow legacy interface to be used for saving GUISettings

Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
---
xbmc/interfaces/legacy/ModuleXbmc.cpp | 5 +++++
xbmc/interfaces/legacy/ModuleXbmc.h | 8 ++++++++
2 files changed, 13 insertions(+)
xbmc/interfaces/legacy/ModuleXbmc.cpp | 5 +++++
xbmc/interfaces/legacy/ModuleXbmc.h | 21 +++++++++++++++++++++
2 files changed, 26 insertions(+)

diff --git a/xbmc/interfaces/legacy/ModuleXbmc.cpp b/xbmc/interfaces/legacy/ModuleXbmc.cpp
index 7bf9093..d691955 100644
index 0b921a8..a599e4c 100644
--- a/xbmc/interfaces/legacy/ModuleXbmc.cpp
+++ b/xbmc/interfaces/legacy/ModuleXbmc.cpp
@@ -493,6 +493,11 @@ namespace XBMCAddon
@@ -496,6 +496,11 @@ namespace XBMCAddon
CAEFactory::Resume();
}

Expand All @@ -26,24 +26,37 @@ index 7bf9093..d691955 100644
{
std::string convertedLanguage;
diff --git a/xbmc/interfaces/legacy/ModuleXbmc.h b/xbmc/interfaces/legacy/ModuleXbmc.h
index 09169dd..98b4190 100644
index 22e5fcf..59e43d9 100644
--- a/xbmc/interfaces/legacy/ModuleXbmc.h
+++ b/xbmc/interfaces/legacy/ModuleXbmc.h
@@ -403,6 +403,14 @@ namespace XBMCAddon
*/
void audioResume();

+ /**
+ * saveSettings() -- saves settings to guisettings.xml
+ *
+ * example:
+ * xbmc.saveSettings()
+ */
@@ -919,6 +919,27 @@ namespace XBMCAddon
#ifdef DOXYGEN_SHOULD_USE_THIS
///
/// \ingroup python_xbmc
+ /// @brief \python_func{ xbmc.saveSettings() }
+ ///-----------------------------------------------------------------------
+ /// Save Kodi settings.
+ ///
+ ///
+ /// ------------------------------------------------------------------------
+ ///
+ /// **Example:**
+ /// ~~~~~~~~~~~~~{.py}
+ /// ..
+ /// xbmc.saveSettings()
+ /// ..
+ /// ~~~~~~~~~~~~~
+ ///
+#else
+ void saveSettings();
+#endif
+
/**
* convertLanguage(language, format) -- Returns the given language converted to the given format as a string.
*
+#ifdef DOXYGEN_SHOULD_USE_THIS
+ ///
+ /// \ingroup python_xbmc
/// @brief \python_func{ xbmc.getUserAgent() }
///-----------------------------------------------------------------------
/// @brief Returns Kodi's HTTP UserAgent string
--
2.1.0
2.7.4

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 9c5ce5636047ddc1d901f2895a5fcf90bca24a99 Mon Sep 17 00:00:00 2001
From 51075c090ac6dd64a70565d5a914b0e25742c8f4 Mon Sep 17 00:00:00 2001
From: Sam Nazarko <email@samnazarko.co.uk>
Date: Fri, 20 May 2016 17:18:13 +0100
Subject: [PATCH] Add enumerated type OSMCSettingsState
Expand All @@ -10,18 +10,18 @@ Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
2 files changed, 19 insertions(+)

diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 1b5f3b8..537977c 100644
index 137bed7..34a0615 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -267,6 +267,7 @@ CApplication::CApplication(void)
@@ -264,6 +264,7 @@ CApplication::CApplication(void)
, m_progressTrackingItem(new CFileItem)
, m_musicInfoScanner(new CMusicInfoScanner)
, m_fallbackLanguageLoaded(false)
+ , m_eOSMCWalkthroughState(OSMC_WALKTHROUGH_NOTRUNNING)
, m_WaitingExternalCalls(0)
, m_ProcessedExternalCalls(0)
{
m_network = NULL;
TiXmlBase::SetCondenseWhiteSpace(false);
@@ -3081,6 +3082,12 @@ void CApplication::Stop(int exitCode)
@@ -2981,6 +2982,12 @@ void CApplication::Stop(int exitCode)
Sleep(200);
}

Expand All @@ -31,14 +31,14 @@ index 1b5f3b8..537977c 100644
+ CRepositoryUpdater::GetInstance().ScheduleUpdate();
+}
+
bool CApplication::PlayMedia(const CFileItem& item, int iPlaylist)
bool CApplication::PlayMedia(const CFileItem& item, const std::string &player, int iPlaylist)
{
//If item is a plugin, expand out now and run ourselves again
diff --git a/xbmc/Application.h b/xbmc/Application.h
index 1eb379d..49ac585 100644
index 22a6026..a59f4c5 100644
--- a/xbmc/Application.h
+++ b/xbmc/Application.h
@@ -155,6 +155,18 @@ public:
@@ -159,6 +159,18 @@ public:
void StopPVRManager();
bool IsCurrentThread() const;
void Stop(int exitCode);
Expand Down

0 comments on commit 1e200f4

Please sign in to comment.