Skip to content

Commit

Permalink
Use the tvshow folder for searching for actor art for episodes. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marshall committed Oct 11, 2012
1 parent c241e0c commit 28aacd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions xbmc/video/VideoInfoScanner.cpp
Expand Up @@ -1042,7 +1042,7 @@ namespace VIDEO
if (!m_database.Open())
return -1;

GetArtwork(pItem, content, videoFolder, useLocal);
GetArtwork(pItem, content, videoFolder, useLocal, showInfo ? showInfo->m_strPath : "");
// ensure the art map isn't completely empty by specifying an empty thumb
map<string, string> art = pItem->GetArt();
if (art.empty())
Expand Down Expand Up @@ -1160,7 +1160,7 @@ namespace VIDEO
}
}

void CVideoInfoScanner::GetArtwork(CFileItem *pItem, const CONTENT_TYPE &content, bool bApplyToDir, bool useLocal)
void CVideoInfoScanner::GetArtwork(CFileItem *pItem, const CONTENT_TYPE &content, bool bApplyToDir, bool useLocal, const std::string &actorArtPath)
{
CVideoInfoTag &movieDetails = *pItem->GetVideoInfoTag();
movieDetails.m_fanart.Unpack();
Expand Down Expand Up @@ -1200,7 +1200,7 @@ namespace VIDEO
// parent folder to apply the thumb to and to search for local actor thumbs
CStdString parentDir = GetParentDir(*pItem);
if (g_guiSettings.GetBool("videolibrary.actorthumbs"))
FetchActorThumbs(movieDetails.m_cast, parentDir);
FetchActorThumbs(movieDetails.m_cast, actorArtPath.empty() ? parentDir : actorArtPath);
if (bApplyToDir)
ApplyThumbToFolder(parentDir, art["thumb"]);
}
Expand Down
3 changes: 2 additions & 1 deletion xbmc/video/VideoInfoScanner.h
Expand Up @@ -96,8 +96,9 @@ namespace VIDEO
\param content content type of the item.
\param bApplyToDir whether we should apply any thumbs to a folder. Defaults to false.
\param useLocal whether we should use local thumbs. Defaults to true.
\param actorArtPath the path to search for actor thumbs. Defaults to empty.
*/
void GetArtwork(CFileItem *pItem, const CONTENT_TYPE &content, bool bApplyToDir=false, bool useLocal=true);
void GetArtwork(CFileItem *pItem, const CONTENT_TYPE &content, bool bApplyToDir=false, bool useLocal=true, const std::string &actorArtPath = "");

/*! \brief Get season thumbs for a tvshow.
All seasons (regardless of whether the user has episodes) are added to the art map.
Expand Down

0 comments on commit 28aacd0

Please sign in to comment.