From 37f119cf69964bc14de26d5ca14f47d7e786ad59 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 23 Dec 2011 01:56:06 +0100 Subject: [PATCH] xbmc-pvr: add pathsubst patch Signed-off-by: Stephan Raue --- .../xbmc-pvr-d967ec3-991-pathsubst.patch | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-d967ec3-991-pathsubst.patch diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-d967ec3-991-pathsubst.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-d967ec3-991-pathsubst.patch new file mode 100644 index 0000000000..729af06bcb --- /dev/null +++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-d967ec3-991-pathsubst.patch @@ -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 pFile(CFileFactory::CreateLoader(url)); + if (!pFile.get()) + return false;