Skip to content

Commit

Permalink
rename GetLocalMetadataPath to GetOpticalFolderPath to better reflect…
Browse files Browse the repository at this point in the history
… use
  • Loading branch information
dragonflight committed Nov 5, 2012
1 parent ff95aba commit 58e754a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions xbmc/FileItem.cpp
Expand Up @@ -2883,7 +2883,7 @@ CStdString CFileItem::GetLocalArt(const std::string &artFile, bool useFolder) co
if (IsOpticalMediaFile())
{ // optical media folders should be treated like a file
// useFolder = true;
strFile = GetLocalMetadataPath();
strFile = GetOpticalFolderPath();
}
if (useFolder)
strFile = URIUtils::GetDirectory(strFile);
Expand Down Expand Up @@ -2947,7 +2947,7 @@ CStdString CFileItem::GetBaseMoviePath(bool bUseFolderNames) const
strMovieName = CMultiPathDirectory::GetFirstPath(m_strPath);

if (IsOpticalMediaFile())
strMovieName = GetLocalMetadataPath();
strMovieName = GetOpticalFolderPath();

if ((!m_bIsFolder || URIUtils::IsInArchive(m_strPath) || IsOpticalMediaFile()) && bUseFolderNames)
{
Expand Down Expand Up @@ -3019,7 +3019,7 @@ CStdString CFileItem::GetLocalFanart() const
if (IsOpticalMediaFile())
{ // grab from the optical media parent folder as well
CFileItemList moreItems;
CDirectory::GetDirectory(GetLocalMetadataPath(), moreItems, g_settings.m_pictureExtensions, DIR_FLAG_NO_FILE_DIRS | DIR_FLAG_READ_CACHE | DIR_FLAG_NO_FILE_INFO);
CDirectory::GetDirectory(GetOpticalFolderPath(), moreItems, g_settings.m_pictureExtensions, DIR_FLAG_NO_FILE_DIRS | DIR_FLAG_READ_CACHE | DIR_FLAG_NO_FILE_INFO);
items.Append(moreItems);
}

Expand Down Expand Up @@ -3048,7 +3048,7 @@ CStdString CFileItem::GetLocalFanart() const
return "";
}
// only called if IsOpticalMediaFile
CStdString CFileItem::GetLocalMetadataPath() const
CStdString CFileItem::GetOpticalFolderPath() const
{
if (m_bIsFolder && !IsFileFolder())
return m_strPath;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/FileItem.h
Expand Up @@ -321,7 +321,7 @@ class CFileItem :
\sa URIUtils::GetParentPath
*/
CStdString GetLocalMetadataPath() const;
CStdString GetOpticalFolderPath() const;

// finds a matching local trailer file
CStdString FindTrailer() const;
Expand Down
4 changes: 2 additions & 2 deletions xbmc/video/VideoInfoScanner.cpp
Expand Up @@ -1252,7 +1252,7 @@ namespace VIDEO
// parent folder to apply the thumb to and to search for local actor thumbs
CStdString parentDir = GetParentDir(*pItem);
if (pItem->IsOpticalMediaFile())
parentDir = URIUtils::GetParentPath(pItem->GetLocalMetadataPath());
parentDir = URIUtils::GetParentPath(pItem->GetOpticalFolderPath());
if (g_guiSettings.GetBool("videolibrary.actorthumbs"))
FetchActorThumbs(movieDetails.m_cast, actorArtPath.empty() ? parentDir : actorArtPath);
if (bApplyToDir)
Expand Down Expand Up @@ -1550,7 +1550,7 @@ namespace VIDEO

if (nfoFile.IsEmpty() && item->IsOpticalMediaFile())
{
CFileItem parentDirectory(item->GetLocalMetadataPath(), true);
CFileItem parentDirectory(item->GetOpticalFolderPath(), true);
nfoFile = GetnfoFile(&parentDirectory, true);
if (nfoFile.IsEmpty())
{
Expand Down
2 changes: 1 addition & 1 deletion xbmc/video/windows/GUIWindowVideoNav.cpp
Expand Up @@ -436,7 +436,7 @@ void CGUIWindowVideoNav::LoadVideoInfo(CFileItemList &items)
CFileItemPtr pItem = items[i];
CFileItemPtr match;
if (!content.IsEmpty()) /* optical media will be stacked down, so it's path won't match the base path */
match = dbItems.Get(pItem->IsOpticalMediaFile() ? pItem->GetLocalMetadataPath() : pItem->GetPath());
match = dbItems.Get(pItem->IsOpticalMediaFile() ? pItem->GetOpticalFolderPath() : pItem->GetPath());
if (match)
{
pItem->UpdateInfo(*match, replaceLabels);
Expand Down

0 comments on commit 58e754a

Please sign in to comment.