mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv
This commit is contained in:
commit
b5af7dc64b
@ -0,0 +1,60 @@
|
||||
diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp
|
||||
index 26d7002..71c4bd4 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.cpp
|
||||
+++ b/xbmc/powermanagement/PowerManager.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "Application.h"
|
||||
#include "cores/AudioEngine/AEFactory.h"
|
||||
#include "input/KeyboardStat.h"
|
||||
+#include "network/Network.h"
|
||||
#include "settings/GUISettings.h"
|
||||
#include "windowing/WindowingFactory.h"
|
||||
#include "utils/log.h"
|
||||
@@ -218,10 +219,34 @@ void CPowerManager::OnSleep()
|
||||
CAEFactory::Suspend();
|
||||
}
|
||||
|
||||
+void CPowerManager::WaitForNet()
|
||||
+{
|
||||
+ CLog::Log(LOGDEBUG, "%s: Waithing for first NIC to come up", __FUNCTION__);
|
||||
+
|
||||
+ const unsigned maxLoopCount = 50u;
|
||||
+ const unsigned sleepTimeMs = 200u;
|
||||
+
|
||||
+ for(unsigned i=0; i < 50; ++i)
|
||||
+ {
|
||||
+ CNetworkInterface* pIface = g_application.getNetwork().GetFirstConnectedInterface();
|
||||
+ if (pIface && pIface->IsEnabled() && pIface->IsConnected())
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "%s: NIC is up after waiting %d ms", __FUNCTION__, i * sleepTimeMs);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Sleep(sleepTimeMs);
|
||||
+ }
|
||||
+
|
||||
+ CLog::Log(LOGDEBUG, "%s: NIC did not come up within %d ms... Lets give up...", __FUNCTION__, maxLoopCount * sleepTimeMs);
|
||||
+}
|
||||
+
|
||||
void CPowerManager::OnWake()
|
||||
{
|
||||
CLog::Log(LOGNOTICE, "%s: Running resume jobs", __FUNCTION__);
|
||||
|
||||
+ WaitForNet();
|
||||
+
|
||||
// reset out timers
|
||||
g_application.ResetShutdownTimers();
|
||||
|
||||
diff --git a/xbmc/powermanagement/PowerManager.h b/xbmc/powermanagement/PowerManager.h
|
||||
index 0a9183c..714b5cc 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.h
|
||||
+++ b/xbmc/powermanagement/PowerManager.h
|
||||
@@ -72,6 +72,8 @@ private:
|
||||
|
||||
void OnLowBattery();
|
||||
|
||||
+ void WaitForNet();
|
||||
+
|
||||
IPowerSyscall *m_instance;
|
||||
};
|
||||
|
@ -0,0 +1,69 @@
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp
|
||||
index da7a06c..86a328e 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "DVDSubtitlesLibass.h"
|
||||
#include "DVDClock.h"
|
||||
+#include "filesystem/File.h"
|
||||
#include "filesystem/SpecialProtocol.h"
|
||||
#include "settings/GUISettings.h"
|
||||
#include "utils/log.h"
|
||||
@@ -76,8 +77,13 @@ CDVDSubtitlesLibass::CDVDSubtitlesLibass()
|
||||
return;
|
||||
|
||||
//Setting default font to the Arial in \media\fonts (used if FontConfig fails)
|
||||
- strPath = "special://xbmc/media/Fonts/";
|
||||
+ strPath = "special://home/media/Fonts/";
|
||||
strPath += g_guiSettings.GetString("subtitles.font");
|
||||
+ if (!XFILE::CFile::Exists(strPath))
|
||||
+ {
|
||||
+ strPath = "special://xbmc/media/Fonts/";
|
||||
+ strPath += g_guiSettings.GetString("subtitles.font");
|
||||
+ }
|
||||
int fc = !g_guiSettings.GetBool("subtitles.overrideassfonts");
|
||||
|
||||
m_dll.ass_set_margins(m_renderer, 0, 0, 0, 0);
|
||||
diff --git a/xbmc/music/karaoke/karaokelyricstext.cpp b/xbmc/music/karaoke/karaokelyricstext.cpp
|
||||
index a73881c..fa9c49f 100644
|
||||
--- a/xbmc/music/karaoke/karaokelyricstext.cpp
|
||||
+++ b/xbmc/music/karaoke/karaokelyricstext.cpp
|
||||
@@ -139,7 +139,9 @@ bool CKaraokeLyricsText::InitGraphics()
|
||||
if ( m_lyrics.empty() )
|
||||
return false;
|
||||
|
||||
- CStdString fontPath = "special://xbmc/media/Fonts/" + g_guiSettings.GetString("karaoke.font");
|
||||
+ CStdString fontPath = "special://home/media/Fonts/" + g_guiSettings.GetString("karaoke.font");
|
||||
+ if (!XFILE::CFile::Exists(fontPath))
|
||||
+ fontPath = "special://xbmc/media/Fonts/" + g_guiSettings.GetString("karaoke.font");;
|
||||
m_karaokeFont = g_fontManager.LoadTTF("__karaoke__", fontPath,
|
||||
m_colorLyrics, 0, g_guiSettings.GetInt("karaoke.fontheight"), FONT_STYLE_BOLD );
|
||||
CGUIFont *karaokeBorder = g_fontManager.LoadTTF("__karaokeborder__", fontPath,
|
||||
diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp
|
||||
index 519bcfb..0583e6a 100644
|
||||
--- a/xbmc/video/windows/GUIWindowFullScreen.cpp
|
||||
+++ b/xbmc/video/windows/GUIWindowFullScreen.cpp
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "pvr/PVRManager.h"
|
||||
#include "pvr/channels/PVRChannelGroupsContainer.h"
|
||||
#include "windowing/WindowingFactory.h"
|
||||
+#include "filesystem/File.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <algorithm>
|
||||
@@ -707,8 +708,13 @@ bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
|
||||
{
|
||||
CSingleLock lock (m_fontLock);
|
||||
|
||||
- CStdString fontPath = "special://xbmc/media/Fonts/";
|
||||
+ CStdString fontPath = "special://home/media/Fonts/";
|
||||
fontPath += g_guiSettings.GetString("subtitles.font");
|
||||
+ if (!XFILE::CFile::Exists(fontPath))
|
||||
+ {
|
||||
+ fontPath = "special://xbmc/media/Fonts/";
|
||||
+ fontPath += g_guiSettings.GetString("subtitles.font");
|
||||
+ }
|
||||
|
||||
// We scale based on PAL4x3 - this at least ensures all sizing is constant across resolutions.
|
||||
RESOLUTION_INFO pal(720, 576, 0);
|
@ -0,0 +1,39 @@
|
||||
From 023acdbbe7b3766e3e1bf509e92d967903aee680 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Sat, 31 Aug 2013 18:19:43 +0300
|
||||
Subject: [PATCH] use udevil to umount. escape mountpath
|
||||
|
||||
---
|
||||
xbmc/linux/PosixMountProvider.cpp | 2 +-
|
||||
xbmc/storage/linux/UDevProvider.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xbmc/linux/PosixMountProvider.cpp b/xbmc/linux/PosixMountProvider.cpp
|
||||
index bbf47fa..2004b44 100644
|
||||
--- a/xbmc/linux/PosixMountProvider.cpp
|
||||
+++ b/xbmc/linux/PosixMountProvider.cpp
|
||||
@@ -130,7 +130,7 @@ bool CPosixMountProvider::Eject(CStdString mountpath)
|
||||
{
|
||||
// just go ahead and try to umount the disk
|
||||
// if it does umount, life is good, if not, no loss.
|
||||
- std::string cmd = "umount " + mountpath;
|
||||
+ std::string cmd = "udevil umount \"" + mountpath + "\"";
|
||||
system(cmd.c_str());
|
||||
|
||||
return true;
|
||||
diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp
|
||||
index e9c86ab..2f3a5ea 100644
|
||||
--- a/xbmc/storage/linux/UDevProvider.cpp
|
||||
+++ b/xbmc/storage/linux/UDevProvider.cpp
|
||||
@@ -183,7 +183,7 @@ bool CUDevProvider::Eject(CStdString mountpath)
|
||||
{
|
||||
// just go ahead and try to umount the disk
|
||||
// if it does umount, life is good, if not, no loss.
|
||||
- std::string cmd = "umount " + mountpath;
|
||||
+ std::string cmd = "udevil umount \"" + mountpath + "\"";
|
||||
system(cmd.c_str());
|
||||
|
||||
return true;
|
||||
--
|
||||
1.7.2.5
|
||||
|
@ -24,15 +24,7 @@
|
||||
|
||||
FC_CACHE_DIRS="/usr/share/fonts/ /usr/share/xbmc/media/Fonts/"
|
||||
|
||||
# hack to support user installed fonts
|
||||
SUBFONTS="/storage/.xbmc/userdata/fonts"
|
||||
if [ -d "$SUBFONTS" ]; then
|
||||
files=$(ls $SUBFONTS/*.[tT][tT][fF] 2>/dev/null | wc -l)
|
||||
if [ "$files" = "0" ]; then
|
||||
cp /usr/share/xbmc/media/Fonts/*.[tT][tT][fF] $SUBFONTS/
|
||||
fi
|
||||
mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/
|
||||
fi
|
||||
# TODO: add /storage/.xbmc/media/Fonts to $FC_CACHE_DIRS ?
|
||||
|
||||
(
|
||||
progress "Creating fontconfig cache"
|
||||
|
Loading…
x
Reference in New Issue
Block a user