Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3254 from koying/fixcleaninet

FIX: Do not remove internet files from video db only because they come from a disappeared source
  • Loading branch information...
commit a141474c2cd38144001b1ba72e9ccb84e22e1f62 2 parents 753f414 + a256e53
jmarshallnz jmarshallnz authored
Showing with 3 additions and 16 deletions.
  1. +3 −16 xbmc/video/VideoDatabase.cpp
19 xbmc/video/VideoDatabase.cpp
View
@@ -7969,9 +7969,6 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
int total = m_pDS->num_rows();
int current = 0;
- bool bIsSource;
- VECSOURCES *pShares = CMediaSourceSettings::Get().GetSources("video");
-
while (!m_pDS->eof())
{
CStdString path = m_pDS->fv("path.strPath").get_asString();
@@ -7983,19 +7980,9 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
if (URIUtils::IsStack(fullPath))
fullPath = CStackDirectory::GetFirstStackedFile(fullPath);
- // 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)
- {
- if (!CFile::Exists(fullPath, false))
- filesToDelete += m_pDS->fv("files.idFile").get_asString() + ",";
- }
- else
- {
- // remove optical, internet related and non-existing files
- // note: this will also remove entries from previously existing media sources
- if (URIUtils::IsOnDVD(fullPath) || URIUtils::IsInternetStream(fullPath, true) || !CFile::Exists(fullPath, false))
- filesToDelete += m_pDS->fv("files.idFile").get_asString() + ",";
- }
+ // remove optical, non-existing files
+ if (URIUtils::IsOnDVD(fullPath) || !CFile::Exists(fullPath, false))
+ filesToDelete += m_pDS->fv("files.idFile").get_asString() + ",";
if (!handle)
{
Please sign in to comment.
Something went wrong with that request. Please try again.