diff options
author | arnova <arnova@svn> | 2010-06-28 17:45:35 +0000 |
---|---|---|
committer | arnova <arnova@svn> | 2010-06-28 17:45:35 +0000 |
commit | 0c9827339e48e4eb9a8410abfee978c3bb1c3974 (patch) | |
tree | 06e0c4295ec2b3a52be3e1b85c5113c25ccbc72c | |
parent | 86f4b14c26717792526af3c540b88b92faf44073 (diff) |
fixed: VideoInfoscanner didn't properly honor ignore NFO files everywhere + cosmetics
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31472 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/VideoInfoScanner.cpp | 28 | ||||
-rw-r--r-- | xbmc/VideoInfoScanner.h | 10 |
2 files changed, 20 insertions, 18 deletions
diff --git a/xbmc/VideoInfoScanner.cpp b/xbmc/VideoInfoScanner.cpp index 1b0208447f..2955086c67 100644 --- a/xbmc/VideoInfoScanner.cpp +++ b/xbmc/VideoInfoScanner.cpp @@ -384,11 +384,11 @@ namespace VIDEO INFO_RET ret = INFO_CANCELLED; if (info2->Content() == CONTENT_TVSHOWS) - ret = RetreiveInfoForTvShow(pItem, bDirNames, info2, useLocal, pURL, fetchEpisodes, pDlgProgress); + ret = RetrieveInfoForTvShow(pItem, bDirNames, info2, useLocal, pURL, fetchEpisodes, pDlgProgress); else if (info2->Content() == CONTENT_MOVIES) - ret = RetreiveInfoForMovie(pItem, bDirNames, info2, useLocal, pURL, pDlgProgress); + ret = RetrieveInfoForMovie(pItem, bDirNames, info2, useLocal, pURL, pDlgProgress); else if (info2->Content() == CONTENT_MUSICVIDEOS) - ret = RetreiveInfoForMusicVideo(pItem, bDirNames, info2, useLocal, pURL, pDlgProgress); + ret = RetrieveInfoForMusicVideo(pItem, bDirNames, info2, useLocal, pURL, pDlgProgress); else { CLog::Log(LOGERROR, "VideoInfoScanner: Unknown content type %d (%s)", info2->Content(), pItem->m_strPath.c_str()); @@ -414,7 +414,7 @@ namespace VIDEO return FoundSomeInfo; } - INFO_RET CVideoInfoScanner::RetreiveInfoForTvShow(CFileItemPtr pItem, bool bDirNames, ScraperPtr &info2, bool useLocal, CScraperUrl* pURL, bool fetchEpisodes, CGUIDialogProgress* pDlgProgress) + INFO_RET CVideoInfoScanner::RetrieveInfoForTvShow(CFileItemPtr pItem, bool bDirNames, ScraperPtr &info2, bool useLocal, CScraperUrl* pURL, bool fetchEpisodes, CGUIDialogProgress* pDlgProgress) { long idTvShow = -1; if (pItem->m_bIsFolder) @@ -427,7 +427,7 @@ namespace VIDEO } if (idTvShow > -1 && (fetchEpisodes || !pItem->m_bIsFolder)) { - INFO_RET ret = RetrieveInfoForEpisodes(pItem, idTvShow, info2, pDlgProgress); + INFO_RET ret = RetrieveInfoForEpisodes(pItem, idTvShow, info2, useLocal, pDlgProgress); if (ret == INFO_ADDED) m_database.SetPathHash(pItem->m_strPath, pItem->GetProperty("hash")); return ret; @@ -463,7 +463,7 @@ namespace VIDEO FetchSeasonThumbs(lResult); if (fetchEpisodes) { - INFO_RET ret = RetrieveInfoForEpisodes(pItem, lResult, info2, pDlgProgress); + INFO_RET ret = RetrieveInfoForEpisodes(pItem, lResult, info2, useLocal, pDlgProgress); if (ret == INFO_ADDED) m_database.SetPathHash(pItem->m_strPath, pItem->GetProperty("hash")); return ret; @@ -492,7 +492,7 @@ namespace VIDEO } if (fetchEpisodes) { - INFO_RET ret = RetrieveInfoForEpisodes(pItem, lResult, info2, pDlgProgress); + INFO_RET ret = RetrieveInfoForEpisodes(pItem, lResult, info2, useLocal, pDlgProgress); if (ret == INFO_ADDED) m_database.SetPathHash(pItem->m_strPath, pItem->GetProperty("hash")); } @@ -502,7 +502,7 @@ namespace VIDEO return INFO_ADDED; } - INFO_RET CVideoInfoScanner::RetreiveInfoForMovie(CFileItemPtr pItem, bool bDirNames, ScraperPtr &info2, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress) + INFO_RET CVideoInfoScanner::RetrieveInfoForMovie(CFileItemPtr pItem, bool bDirNames, ScraperPtr &info2, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress) { if (pItem->m_bIsFolder || !pItem->IsVideo() || pItem->IsNFO() || pItem->IsPlayList()) return INFO_NOT_NEEDED; @@ -554,7 +554,7 @@ namespace VIDEO return INFO_NOT_FOUND; } - INFO_RET CVideoInfoScanner::RetreiveInfoForMusicVideo(CFileItemPtr pItem, bool bDirNames, ScraperPtr &info2, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress) + INFO_RET CVideoInfoScanner::RetrieveInfoForMusicVideo(CFileItemPtr pItem, bool bDirNames, ScraperPtr &info2, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress) { if (pItem->m_bIsFolder || !pItem->IsVideo() || pItem->IsNFO() || pItem->IsPlayList()) return INFO_NOT_NEEDED; @@ -606,7 +606,7 @@ namespace VIDEO return INFO_NOT_FOUND; } - INFO_RET CVideoInfoScanner::RetrieveInfoForEpisodes(CFileItemPtr item, long showID, const ADDON::ScraperPtr &scraper, CGUIDialogProgress *progress) + INFO_RET CVideoInfoScanner::RetrieveInfoForEpisodes(CFileItemPtr item, long showID, const ADDON::ScraperPtr &scraper, bool useLocal, CGUIDialogProgress *progress) { IMDB_EPISODELIST episodes; @@ -647,7 +647,7 @@ namespace VIDEO if (m_pObserver) m_pObserver->OnDirectoryChanged(item->m_strPath); - return OnProcessSeriesFolder(episodes, files, scraper, showID, details.m_strTitle, progress); + return OnProcessSeriesFolder(episodes, files, scraper, useLocal, showID, details.m_strTitle, progress); } void CVideoInfoScanner::EnumerateSeriesFolder(CFileItem* item, EPISODES& episodeList) @@ -1074,7 +1074,7 @@ namespace VIDEO ApplyThumbToFolder(directory, destination); } - INFO_RET CVideoInfoScanner::OnProcessSeriesFolder(IMDB_EPISODELIST& episodes, EPISODES& files, const ADDON::ScraperPtr &scraper, int idShow, const CStdString& strShowTitle, CGUIDialogProgress* pDlgProgress /* = NULL */) + INFO_RET CVideoInfoScanner::OnProcessSeriesFolder(IMDB_EPISODELIST& episodes, EPISODES& files, const ADDON::ScraperPtr &scraper, bool useLocal, int idShow, const CStdString& strShowTitle, CGUIDialogProgress* pDlgProgress /* = NULL */) { if (pDlgProgress) { @@ -1115,10 +1115,12 @@ namespace VIDEO item.m_strPath = file->strPath; // handle .nfo files + CNfoFile::NFOResult result=CNfoFile::NO_NFO; CScraperUrl scrUrl; ScraperPtr info(scraper); item.GetVideoInfoTag()->m_iEpisode = file->iEpisode; - CNfoFile::NFOResult result = CheckForNFOFile(&item, false, info,scrUrl); + if (useLocal) + result = CheckForNFOFile(&item, false, info,scrUrl); if (result == CNfoFile::FULL_NFO) { m_nfoReader.GetDetails(*item.GetVideoInfoTag()); diff --git a/xbmc/VideoInfoScanner.h b/xbmc/VideoInfoScanner.h index 2118dd09cb..d98be4f8fd 100644 --- a/xbmc/VideoInfoScanner.h +++ b/xbmc/VideoInfoScanner.h @@ -122,10 +122,10 @@ namespace VIDEO virtual void Process(); bool DoScan(const CStdString& strDirectory); - INFO_RET RetreiveInfoForTvShow(CFileItemPtr pItem, bool bDirNames, ADDON::ScraperPtr &scraper, bool useLocal, CScraperUrl* pURL, bool fetchEpisodes, CGUIDialogProgress* pDlgProgress); - INFO_RET RetreiveInfoForMovie(CFileItemPtr pItem, bool bDirNames, ADDON::ScraperPtr &scraper, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress); - INFO_RET RetreiveInfoForMusicVideo(CFileItemPtr pItem, bool bDirNames, ADDON::ScraperPtr &scraper, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress); - INFO_RET RetrieveInfoForEpisodes(CFileItemPtr item, long showID, const ADDON::ScraperPtr &scraper, CGUIDialogProgress *progress = NULL); + INFO_RET RetrieveInfoForTvShow(CFileItemPtr pItem, bool bDirNames, ADDON::ScraperPtr &scraper, bool useLocal, CScraperUrl* pURL, bool fetchEpisodes, CGUIDialogProgress* pDlgProgress); + INFO_RET RetrieveInfoForMovie(CFileItemPtr pItem, bool bDirNames, ADDON::ScraperPtr &scraper, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress); + INFO_RET RetrieveInfoForMusicVideo(CFileItemPtr pItem, bool bDirNames, ADDON::ScraperPtr &scraper, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress); + INFO_RET RetrieveInfoForEpisodes(CFileItemPtr item, long showID, const ADDON::ScraperPtr &scraper, bool useLocal, CGUIDialogProgress *progress = NULL); /*! \brief Update the progress bar with the heading and line and check for cancellation \param progress CGUIDialogProgress bar @@ -214,7 +214,7 @@ namespace VIDEO \return INFO_ERROR on failure, INFO_CANCELLED on cancellation, INFO_NOT_FOUND if an episode isn't found, or INFO_ADDED if all episodes are added. */ - INFO_RET OnProcessSeriesFolder(IMDB_EPISODELIST& episodes, EPISODES& files, const ADDON::ScraperPtr &scraper, int idShow, const CStdString& strShowTitle, CGUIDialogProgress* pDlgProgress = NULL); + INFO_RET OnProcessSeriesFolder(IMDB_EPISODELIST& episodes, EPISODES& files, const ADDON::ScraperPtr &scraper, bool useLocal, int idShow, const CStdString& strShowTitle, CGUIDialogProgress* pDlgProgress = NULL); void EnumerateSeriesFolder(CFileItem* item, EPISODES& episodeList); bool ProcessItemNormal(CFileItemPtr item, EPISODES& episodeList, CStdString regexp); |