aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marshall <jmarshall@never.you.mind>2012-11-11 16:16:46 +1300
committerJonathan Marshall <jmarshall@never.you.mind>2012-11-11 16:25:58 +1300
commit67431a3c473b025135008b30078af0ed31053c47 (patch)
tree7bd2e70f032c4d66ec1850b37cf55b00c578c0f5
parent9c3c667e076fe09f5812a2e71f4273fa27a87021 (diff)
videodb:// and stack:// items didn't go through the correct checks for playlists etc. before attempting to extract streamdetails/thumbs. fixes #13502
-rw-r--r--xbmc/video/VideoThumbLoader.cpp22
-rw-r--r--xbmc/video/VideoThumbLoader.h1
2 files changed, 10 insertions, 13 deletions
diff --git a/xbmc/video/VideoThumbLoader.cpp b/xbmc/video/VideoThumbLoader.cpp
index 81d25e07cb..731d1c4646 100644
--- a/xbmc/video/VideoThumbLoader.cpp
+++ b/xbmc/video/VideoThumbLoader.cpp
@@ -47,13 +47,11 @@ CThumbExtractor::CThumbExtractor(const CFileItem& item, const CStdString& listpa
m_thumb = thumb;
m_item = item;
- m_path = item.GetPath();
-
if (item.IsVideoDb() && item.HasVideoInfoTag())
- m_path = item.GetVideoInfoTag()->m_strFileNameAndPath;
+ m_item.SetPath(item.GetVideoInfoTag()->m_strFileNameAndPath);
- if (URIUtils::IsStack(m_path))
- m_path = CStackDirectory::GetFirstStackedFile(m_path);
+ if (m_item.IsStack())
+ m_item.SetPath(CStackDirectory::GetFirstStackedFile(m_item.GetPath()));
}
CThumbExtractor::~CThumbExtractor()
@@ -73,9 +71,9 @@ bool CThumbExtractor::operator==(const CJob* job) const
bool CThumbExtractor::DoWork()
{
- if (URIUtils::IsLiveTV(m_path)
- || URIUtils::IsUPnP(m_path)
- || URIUtils::IsDAAP(m_path)
+ if (m_item.IsLiveTV()
+ || URIUtils::IsUPnP(m_item.GetPath())
+ || m_item.IsDAAP()
|| m_item.IsDVD()
|| m_item.IsDVDImage()
|| m_item.IsDVDFile(false, true)
@@ -84,17 +82,17 @@ bool CThumbExtractor::DoWork()
|| m_item.IsPlayList())
return false;
- if (URIUtils::IsRemote(m_path) && !URIUtils::IsOnLAN(m_path))
+ if (URIUtils::IsRemote(m_item.GetPath()) && !URIUtils::IsOnLAN(m_item.GetPath()))
return false;
bool result=false;
if (m_thumb)
{
- CLog::Log(LOGDEBUG,"%s - trying to extract thumb from video file %s", __FUNCTION__, m_path.c_str());
+ CLog::Log(LOGDEBUG,"%s - trying to extract thumb from video file %s", __FUNCTION__, m_item.GetPath().c_str());
// construct the thumb cache file
CTextureDetails details;
details.file = CTextureCache::GetCacheFile(m_target) + ".jpg";
- result = CDVDFileInfo::ExtractThumb(m_path, details, &m_item.GetVideoInfoTag()->m_streamDetails);
+ result = CDVDFileInfo::ExtractThumb(m_item.GetPath(), details, &m_item.GetVideoInfoTag()->m_streamDetails);
if(result)
{
CTextureCache::Get().AddCachedTexture(m_target, details);
@@ -105,7 +103,7 @@ bool CThumbExtractor::DoWork()
}
else if (m_item.HasVideoInfoTag() && !m_item.GetVideoInfoTag()->HasStreamDetails())
{
- CLog::Log(LOGDEBUG,"%s - trying to extract filestream details from video file %s", __FUNCTION__, m_path.c_str());
+ CLog::Log(LOGDEBUG,"%s - trying to extract filestream details from video file %s", __FUNCTION__, m_item.GetPath().c_str());
result = CDVDFileInfo::GetFileStreamDetails(&m_item);
}
diff --git a/xbmc/video/VideoThumbLoader.h b/xbmc/video/VideoThumbLoader.h
index ce99ad9112..9ea86fc898 100644
--- a/xbmc/video/VideoThumbLoader.h
+++ b/xbmc/video/VideoThumbLoader.h
@@ -56,7 +56,6 @@ public:
virtual bool operator==(const CJob* job) const;
- CStdString m_path; ///< path of video to extract thumb from
CStdString m_target; ///< thumbpath
CStdString m_listpath; ///< path used in fileitem list
CFileItem m_item;