Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed: no need to fetch the videoinfotag twice

  • Loading branch information...
commit 1408a35440ff9bd7945eacfdd264430885b31ed6 1 parent ea50355
vdrfan authored
Showing with 7 additions and 8 deletions.
  1. +7 −8 xbmc/video/VideoInfoScanner.cpp
View
15 xbmc/video/VideoInfoScanner.cpp
@@ -1012,13 +1012,17 @@ namespace VIDEO
if (!m_database.Open())
return -1;
- CVideoInfoTag *tag = pItem->GetVideoInfoTag();
- CStdString strTitle(tag->m_strTitle);
+ CVideoInfoTag &movieDetails = *pItem->GetVideoInfoTag();
+ if (movieDetails.m_basePath.IsEmpty())
+ movieDetails.m_basePath = pItem->GetBaseMoviePath(videoFolder);
+ movieDetails.m_parentPathID = m_database.AddPath(URIUtils::GetParentPath(movieDetails.m_basePath));
+
+ CStdString strTitle(movieDetails.m_strTitle);
if (idShow > -1 && content == CONTENT_TVSHOWS)
{
CStdString strShowTitle = m_database.GetTvShowTitleById(idShow);
- strTitle.Format("%s - %ix%i - %s", strShowTitle.c_str(), tag->m_iSeason, tag->m_iEpisode, tag->m_strTitle.c_str());
+ strTitle.Format("%s - %ix%i - %s", strShowTitle.c_str(), movieDetails.m_iSeason, movieDetails.m_iEpisode, strTitle.c_str());
}
if (m_pObserver)
@@ -1027,11 +1031,6 @@ namespace VIDEO
CLog::Log(LOGDEBUG, "VideoInfoScanner: Adding new item to %s:%s", TranslateContent(content).c_str(), pItem->GetPath().c_str());
long lResult = -1;
- CVideoInfoTag &movieDetails = *pItem->GetVideoInfoTag();
- if (movieDetails.m_basePath.IsEmpty())
- movieDetails.m_basePath = pItem->GetBaseMoviePath(videoFolder);
- movieDetails.m_parentPathID = m_database.AddPath(URIUtils::GetParentPath(movieDetails.m_basePath));
-
if (content == CONTENT_MOVIES)
{
// find local trailer first
Please sign in to comment.
Something went wrong with that request. Please try again.