mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
xbmc-pvr: add pathsubst patch
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
b58808a8bf
commit
37f119cf69
@ -0,0 +1,103 @@
|
||||
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
|
||||
index 36eb715..c776f65 100644
|
||||
--- a/xbmc/Application.cpp
|
||||
+++ b/xbmc/Application.cpp
|
||||
@@ -4322,7 +4322,7 @@ void CApplication::CheckScreenSaverAndDPMS()
|
||||
WakeUpScreenSaver();
|
||||
}
|
||||
else if (maybeScreensaver
|
||||
- && elapsed > g_guiSettings.GetInt("screensaver.time") * 60)
|
||||
+ && elapsed > g_guiSettings.GetInt("screensaver.time") * 10)
|
||||
{
|
||||
ActivateScreenSaver();
|
||||
}
|
||||
diff --git a/xbmc/filesystem/DirectoryCache.cpp b/xbmc/filesystem/DirectoryCache.cpp
|
||||
index e3fb399..84bc32e 100644
|
||||
--- a/xbmc/filesystem/DirectoryCache.cpp
|
||||
+++ b/xbmc/filesystem/DirectoryCache.cpp
|
||||
@@ -67,7 +67,7 @@ bool CDirectoryCache::GetDirectory(const CStdString& strPath, CFileItemList &ite
|
||||
{
|
||||
CSingleLock lock (m_cs);
|
||||
|
||||
- CStdString storedPath = strPath;
|
||||
+ CStdString storedPath = URIUtils::SubstitutePath(strPath);
|
||||
URIUtils::RemoveSlashAtEnd(storedPath);
|
||||
|
||||
ciCache i = m_cache.find(storedPath);
|
||||
@@ -106,7 +106,7 @@ void CDirectoryCache::SetDirectory(const CStdString& strPath, const CFileItemLis
|
||||
// this is the best solution for now.
|
||||
CSingleLock lock (m_cs);
|
||||
|
||||
- CStdString storedPath = strPath;
|
||||
+ CStdString storedPath = URIUtils::SubstitutePath(strPath);
|
||||
URIUtils::RemoveSlashAtEnd(storedPath);
|
||||
|
||||
ClearDirectory(storedPath);
|
||||
@@ -130,7 +130,7 @@ void CDirectoryCache::ClearDirectory(const CStdString& strPath)
|
||||
{
|
||||
CSingleLock lock (m_cs);
|
||||
|
||||
- CStdString storedPath = strPath;
|
||||
+ CStdString storedPath = URIUtils::SubstitutePath(strPath);
|
||||
URIUtils::RemoveSlashAtEnd(storedPath);
|
||||
|
||||
iCache i = m_cache.find(storedPath);
|
||||
@@ -142,7 +142,7 @@ void CDirectoryCache::ClearSubPaths(const CStdString& strPath)
|
||||
{
|
||||
CSingleLock lock (m_cs);
|
||||
|
||||
- CStdString storedPath = strPath;
|
||||
+ CStdString storedPath = URIUtils::SubstitutePath(strPath);
|
||||
URIUtils::RemoveSlashAtEnd(storedPath);
|
||||
|
||||
iCache i = m_cache.begin();
|
||||
diff --git a/xbmc/filesystem/File.cpp b/xbmc/filesystem/File.cpp
|
||||
index 415f2bf..375226e 100644
|
||||
--- a/xbmc/filesystem/File.cpp
|
||||
+++ b/xbmc/filesystem/File.cpp
|
||||
@@ -217,16 +217,15 @@ bool CFile::Open(const CStdString& strFileName, unsigned int flags)
|
||||
try
|
||||
{
|
||||
bool bPathInCache;
|
||||
- CURL url2(strFileName);
|
||||
- if (url2.GetProtocol() == "zip")
|
||||
- url2.SetOptions("");
|
||||
- if (!g_directoryCache.FileExists(url2.Get(), bPathInCache) )
|
||||
+ CURL url(URIUtils::SubstitutePath(strFileName));
|
||||
+ if (url.GetProtocol() == "zip")
|
||||
+ url.SetOptions("");
|
||||
+ if (!g_directoryCache.FileExists(url.Get(), bPathInCache) )
|
||||
{
|
||||
if (bPathInCache)
|
||||
return false;
|
||||
}
|
||||
|
||||
- CURL url(URIUtils::SubstitutePath(strFileName));
|
||||
if ( (flags & READ_NO_CACHE) == 0 && URIUtils::IsInternetStream(url) && !CUtil::IsPicture(strFileName) )
|
||||
m_flags |= READ_CACHED;
|
||||
|
||||
@@ -344,7 +343,7 @@ bool CFile::OpenForWrite(const CStdString& strFileName, bool bOverWrite)
|
||||
|
||||
bool CFile::Exists(const CStdString& strFileName, bool bUseCache /* = true */)
|
||||
{
|
||||
- CURL url;
|
||||
+ CURL url(URIUtils::SubstitutePath(strFileName));
|
||||
|
||||
try
|
||||
{
|
||||
@@ -354,14 +353,12 @@ bool CFile::Exists(const CStdString& strFileName, bool bUseCache /* = true */)
|
||||
if (bUseCache)
|
||||
{
|
||||
bool bPathInCache;
|
||||
- if (g_directoryCache.FileExists(strFileName, bPathInCache) )
|
||||
+ if (g_directoryCache.FileExists(url.Get(), bPathInCache) )
|
||||
return true;
|
||||
if (bPathInCache)
|
||||
return false;
|
||||
}
|
||||
|
||||
- url = URIUtils::SubstitutePath(strFileName);
|
||||
-
|
||||
auto_ptr<IFile> pFile(CFileFactory::CreateLoader(url));
|
||||
if (!pFile.get())
|
||||
return false;
|
Loading…
x
Reference in New Issue
Block a user