Skip to content

Commit

Permalink
changed: fetching the video sources once is enough while cleaning up …
Browse files Browse the repository at this point in the history
…the video library
  • Loading branch information
mkortstiege committed Dec 17, 2011
1 parent b26eadc commit 1ba878a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xbmc/video/VideoDatabase.cpp
Expand Up @@ -6490,6 +6490,10 @@ void CVideoDatabase::CleanDatabase(IVideoInfoScannerObserver* pObserver, const v

int total = m_pDS->num_rows();
int current = 0;

bool bIsSource;
VECSOURCES *pShares = g_settings.GetSourcesFromType("video");

while (!m_pDS->eof())
{
CStdString path = m_pDS->fv("path.strPath").get_asString();
Expand All @@ -6501,10 +6505,6 @@ void CVideoDatabase::CleanDatabase(IVideoInfoScannerObserver* pObserver, const v
if (URIUtils::IsStack(fullPath))
fullPath = CStackDirectory::GetFirstStackedFile(fullPath);

// check for deletion
bool bIsSource;
VECSOURCES *pShares = g_settings.GetSourcesFromType("video");

// check if we have a internet related file that is part of a media source
if (URIUtils::IsInternetStream(fullPath, true) && CUtil::GetMatchingSource(fullPath, *pShares, bIsSource) > -1)
{
Expand Down

0 comments on commit 1ba878a

Please sign in to comment.